type in input javascript code example
Example 1: how to ask input in javascript
let name=prompt("What is your name?");
console.log("Hi "+name)
Example 2: setting the type of an input in js
myInput.type = "text"; //or "button" or "password" etc.
let name=prompt("What is your name?");
console.log("Hi "+name)
myInput.type = "text"; //or "button" or "password" etc.