get user input from an input javascript code example Example: js get input from user var name = prompt("Please enter your name", "Harry Potter");