Prompt will display a dialog to the user requesting their input. You can provide a message that will be placed above the text field. The return value is a string representing the input provided by the user.
var name = prompt("What's your name?");
console.log("Hello, " + name);
...