Javascrip Calculator

Hi! I just started javascript. Our professor want us to make a calculator with JS.
I want to make a button with html and put the value of a INT a pass it trough javascript

When I push the button it does’t pass the value too:

var num1 = Number(document.getElementById(‘num’));

It used to work if I use text input.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.