I have the following HTML Input:
<input type="number" id="input-number"/>
In my JS code below, when I try to do .value on userInput I cannot do so, I can only do .nodeValue.
Why is this?
// elements on page
const userInput = document.getElementById('input-number');
const addBtn = document.getElementById('btn-add');
const subtractBtn = document.getElementById('btn-subtract');
I just found it's working fine here. You can check this example.