Skip to main content

Javascript code to accept name from the user and display a welcome on the web page

 Javascript code to accept name from the user and display a welcome on the web page:



let person = prompt("Please enter your name", "Raju");

document.write("Welcome "+ person);


Output:

Welcome 'Raju'


Comments