+ 1
How to accept data from the user with out assigning?
Any other way other than" var x=10;"
1 Respuesta
+ 5
Use prompt to get user input. Remember it only returns string, to get integer from it or use string expression use eval() function
var user = prompt("Please enter your name");
document. write(user);