+ 2
How to make input field on js as c++'s cin >>??
6 odpowiedzi
+ 9
var userInput = prompt("Please enter a value:")
to save the user's input into a variable. Then you can output that value in a myriad of different ways.
Do note that prompt() will return the user's entry as a string and you will need to use parseInt() or parseFloat() if you intend to use the value as a number.
+ 7
Jelaleddin Atom, Visual Studio Code, Brackets - these are best free IDEs for js as per as I know.
+ 4
YOU CAN USE PROMPT TO TAKE USER INPUT AND STORE IT IN VARIABLE.
var name = prompt ("WHAT IS YOUR NAME");
+ 1
Meet Mehta, thanks :-)..
+ 1
Rohan Karan, thanks... which free IDE is good for js??
+ 1
Rohan Karan, thanks a lot!!! :-)