In javascript learning path for beginners it haven't taught about how to take input from user , can anyone suggest it? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

In javascript learning path for beginners it haven't taught about how to take input from user , can anyone suggest it?

16th Jul 2023, 11:38 AM
chetan kumar
chetan kumar - avatar
5 Answers
+ 1
JavaScript uses the prompt method to take input from the user. An example is given where information is being collected and printed from the user through a prompt inside the variable called person let person = prompt("Please enter your name", "Harry Potter"); console.log(person);
18th Jul 2023, 7:01 AM
EAJUDDIN
EAJUDDIN - avatar
+ 1
chetan kumar readLine() This method is typically used inside this application to collecting information from the app's built-in information library. When you write the code yourself, you need to use the prompt method to receive information from the user.
18th Jul 2023, 7:08 AM
EAJUDDIN
EAJUDDIN - avatar
+ 1
chetan kumar you are welcome. 😊
18th Jul 2023, 7:11 AM
EAJUDDIN
EAJUDDIN - avatar
0
EAJUDDIN ya but in learning path it showing readLine()...??
18th Jul 2023, 7:02 AM
chetan kumar
chetan kumar - avatar
18th Jul 2023, 7:09 AM
chetan kumar
chetan kumar - avatar