I'm currently making a simple calculator for use in an intro to Javascript lesson. I would like to know if there's a simpler way of taking the value from a HTML input textbox as an integer than having to use the Javascript parse() method?
HTML:
<input type = "Text" id="num1">
JS:
var num1 = parseInt(document.getElementById("num1").value);