Created
November 1, 2020 06:48
-
-
Save kingdayx/848d7cff7fb9a7ba28d0becd0c5b9b72 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.getElementById("count").onclick = function () { | |
incrementor(); | |
}; | |
function incrementor() { | |
let counterValue = 0; | |
let counter = document.getElementById("num"); | |
counterValue += 1; | |
console.log("increment", counterValue); | |
counter.textContent = counterValue; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment