JavaScript program to scan name of user and say hello with name


Following program shows you how to scan name of user and say hello with name
In this program we get name from user using prompt method and prints hello with that name using console.log()

var name = prompt("Please enter your name:");
console.log("Hello " + name);

Output:

Hello tom