Table of contents Home page
Execute this code
text = prompt("Enter some text"); if (text == null) { alert("You pressed the cancellation button.") } else if (text == "") { alert("You did not enter text.") } else { alert("This is what you entered: " + text) }