how many prompts can javascript code example
Example 1: prompt js
var answer = prompt("How are you? ");
Example 2: how to get a user input in js
Copyvar name = window.prompt("Enter your name: ");
alert("Your name is " + name);
var answer = prompt("How are you? ");
Copyvar name = window.prompt("Enter your name: ");
alert("Your name is " + name);