User input in JavaScript | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

User input in JavaScript

Is there a way to get console input in JavaScript like python’s input() or C++ cin<<“this is input”<<endl; ?

30th May 2019, 2:06 AM
Andrew
Andrew  - avatar
3 Answers
0
Are you talking about Node.js?
30th May 2019, 2:44 AM
777
777 - avatar
0
Not sure about console but you can take input in HTML form and take it to JavaScript using: document.getElementById()
30th May 2019, 5:26 AM
Anurag
Anurag - avatar
- 1
Prompt("");
16th Nov 2020, 11:16 AM
MD Siddiqur Rahman