Generation

generate functionTue, 17 Jan 2023

Write a code for open new window

var txt; 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?"; } document.getElementById("demo").innerHTML = txt;

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant