+ 3
I am new to JavaScript and need help. How do I take user input?
I am on the loops and if statements lesson, but I am too lazy to go through it (because I already know it). Please help.
5 odpowiedzi
+ 3
There are several ways:
As a separate dialog box:
prompt('Question', "default answer");
Or as a form:
<input type="something, like text, number, color">
And then using the .value property
+ 2
Prometheus 🇸🇬 can I not assign the variable like var _input = (variable assignment command)
+ 2
K
+ 1
you need to the DOM lessons, which is second last before ES6 lessons. Take your time to go through the JavaScript tutorials, instead of asking non-specific programming questions without a code attempt.
0
don't be lazy