Answers for "javascript alert get text"

1

javascript alert get text

var person = prompt("Please enter your name", "Harry Potter");

if (person == null || person == "") {
  txt = "User cancelled the prompt.";
} else {
  txt = "Hello " + person + "! How are you today?";
}
Posted by: Guest on April-24-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language