I’m not an expert on JS, nor on c9.io, so I am turning to those who are. I have a simple project and this line in my html (I’m using bootstrap 4:
<div class="col-4"> <h2 id="_score">Score: $0</h2> </div>
I am linking in a .js file that has a let variable called score:
let score = 0 // this is not in a function
If I change id="_score" to id=“score”, it breaks my button handlers (such as the one shown here):
<button class="btn btn-warning" onclick="showQuestion('math', 200)">$200</button>
Any advice would be appreciated!