js method for getting input from the user code example
Example 1: how to get a user input in js
Copyvar name = window.prompt("Enter your name: ");
alert("Your name is " + name);
Example 2: Accessing user input through js
var x = document.getElementById("myText").value;