+ 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.

27th Jul 2019, 3:21 AM
Danger
Danger - avatar
5 Answers
+ 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
27th Jul 2019, 3:26 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 2
Prometheus 🇸🇬 can I not assign the variable like var _input = (variable assignment command)
27th Jul 2019, 3:31 AM
Danger
Danger - avatar
+ 2
K
27th Jul 2019, 3:48 AM
Danger
Danger - avatar
+ 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.
27th Jul 2019, 3:47 AM
Gordon
Gordon - avatar
0
don't be lazy
27th Jul 2019, 3:28 AM
Gordon
Gordon - avatar