read input in html code example
Example 1: Javascript get text input value
var inputValue = document.getElementById("myTextInputID").value;
Example 2: input in js
var answer = prompt("Question")
var inputValue = document.getElementById("myTextInputID").value;
var answer = prompt("Question")