alert and prompt in javascript code example Example: alert and prompt in javascript let name = prompt("What's your name?") alert("Hello " + name);