javascript get user input from console code example
Example 1: javascript console input
//SpiderMonkey
var input = readline();
//Vanilla javascript
var input = prompt("Enter input:");
Example 2: how to ask input in javascript
Copyvar name = window.prompt("Enter your name: ");
alert("Your name is " + name);