My html input number value is not recognized in my J.S code, it alerts Nothing.. the same thing happens if i want to make another code
var age = document.getElementById("ent").value;
document.getElementById("press").onclick = function() {
alert(age);
}
<input type="number" id="ent">
<button id="press">seed</button>
var age = document.getElementById("ent").value;inside the onclick event handler, should fix it. Storing it outside will set the value on load, which would be nothing.