I'm making a calculator and for some weird reason when I try to get the inputs and add them when I try it it doesn't have any output. Not even '[Object InputHTMLElement][Object InputHTMLElement]'.
getElementById returns a DOM object. You need to get the value property of the inputs to get the text that it holds.
value
let num1 = document.getElementById("num1").value; let sym = document.getElementById("sym").value; let num2 = document.getElementById("num2").value;
@SixBeeps Thanks!
getElementById returns a DOM object. You need to get the
value
property of the inputs to get the text that it holds.@SixBeeps Thanks!