Help debugging very basic calc

I’m trying to make a very basic js calculator but I can’t seem to get it to work. Can anyone take a look and tell me what I’m doing wrong?

Well, for starters you don’t have an event to run your calc() function, since you want it to run when you click the button , you need to attach an event listener to your calculate button which will then listen for the click event and run the calc() function, so for example, if you give your button an id of calc…, will run the calc() on a click

var calculate = document.getElementById('calc');
calculate.addEventListener('click',()=>{
  calc()
})