+ 2
How can i have a input from a user..that i can use as my var;
in JS i select var all the time... but i don't know how to take inputss from users... anyone plz...
3 Answers
+ 4
Var red = prompt("what is your name") ;
Var blue = alert ("hello"+ red) ;
//this code means to take the name of the person and give an hello
+ 1
I'm pretty sure that the prompt command saves the input as a string. So if you were asking for numbers to use in an equation, you would have to use the parseInt command.
+ 1
no, I tried to make a website using prompt to calculate from any number the user of the website put in the squareroot and it works