Home / Javascript Tips Generated By ChatGPT / Getting User Input with prompt in Javascript Use prompt() to get input from the user. Source Code let userName = prompt("What's your name?", "Guest"); console.log(userName);