+ 2

How to make input field on js as c++'s cin >>??

2nd Jun 2018, 9:34 AM
Jelaleddin
6 Answers
+ 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.
2nd Jun 2018, 9:40 AM
***
+ 7
Jelaleddin Atom, Visual Studio Code, Brackets - these are best free IDEs for js as per as I know.
2nd Jun 2018, 9:48 AM
***
+ 4
YOU CAN USE PROMPT TO TAKE USER INPUT AND STORE IT IN VARIABLE. var name = prompt ("WHAT IS YOUR NAME");
2nd Jun 2018, 9:38 AM
Meet Mehta
Meet Mehta - avatar
+ 1
Meet Mehta, thanks :-)..
2nd Jun 2018, 9:39 AM
Jelaleddin
+ 1
Rohan Karan, thanks... which free IDE is good for js??
2nd Jun 2018, 9:43 AM
Jelaleddin
+ 1
Rohan Karan, thanks a lot!!! :-)
2nd Jun 2018, 9:54 AM
Jelaleddin