Coding Global Background
Coding Global

Why is not this working?

Archived 9 months ago
23 messages
3 members
Created 10 months ago
Updated 10 months ago
Open in Discord
P
</Jacunso>
Verified
// Counter program
const decrease = document.getElementById("decreasebtn");
const reset = document.getElementById("resetbtn");
const increase = document.getElementById("increasebtn");
const countlbl = document.getElementById("myH13");
let count;

countlbl = Number(countlbl);

decrease.onclick = function(){
    count--;
    countlbl.textContent
}
increase.onclick = function(){
    count++;
    countlbl.textContent = count
}

Replies (22)