Edit in JSFiddle
JavaScript
Result
var name = prompt('What is your name?'); alert(name);