+ 1

How to accept data from the user with out assigning?

Any other way other than" var x=10;"

15th Nov 2016, 12:46 PM
Athul
Athul - avatar
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);
15th Nov 2016, 12:51 PM
Aditya kumar pandey
Aditya kumar pandey - avatar