Hey Student,
This is a tricky one! What I would first do is use console.log()
to make things more transparent and see what's really going on when your onclick event listener callback is fired.
When I console.log(btnNum)
inside the onclick callback function I get 3 not matter what button I click, which isn't what we want. So I would start using console.log()
to really dig in and see what's going on.
If you still feel stuck I provided an explanation of what is happening below: