I am trying to make a button add an amount of points to another variable and then displaying the value of the variable as a score, but I cant seem to get it working.
I tried doing the following script but whenever I try to test it, the whole score variable disappears and i don't know what to do
<button onclick="addPoints25()">done</button>
<p id="counter"></p>
<script>
var points = 0;
document.getElementById("counter").innerHTML = points;
function addPoints25() {
var points + 25;
}
</script>