+ 4
How to take Input In JavaScript?
as we take "cin" in C++ and as we take public static void main (int a) in java. so how i can take Input from the user in JavaScript please explain me in detail.
2 Answers
+ 5
var input=prompt("enter anything");
+ 4
Running this code will bring a pop-up displaying alert anything,soo...anything you enter will be the value of variable "input"