+ 5
Please how do one get input from the user using Pure JS. No HTML.
5 Réponses
+ 2
Use the prompt build in function but note out of the is prompt is a string and if you need to get you will have to use the number build in function
prompt()
toNumber()
+ 15
Use prompt() to get user input:
var input = prompt();
+ 4
For Example you want a user to enter his/her name in JS
var input = prompt("Enter your name:");
alert(input);
+ 1
If you use node.js you can use readline-sync
+ 1
Var Name = prompt("VEDANG");
Alert(Name );