0
What is the code for getting user input in JavaScript
I can't find
2 Answers
+ 2
You can use prompt() to take user input
For example
var name = prompt("Enter name");
You can also set default answer in prompt
Like prompt("Enter name", "John") ;
+ 1
Gyanendra Prakash these threads might be helpful to you.
https://www.sololearn.com/Discuss/2406813/?ref=app
https://www.sololearn.com/Discuss/1663443/?ref=app
https://www.sololearn.com/Discuss/1810395/?ref=app
Further, please use search before posting a question :)