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