Created
February 9, 2019 19:17
-
-
Save ehzawad/3f1ed421b36c989bea4cfa4b041c750d to your computer and use it in GitHub Desktop.
This file contains 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.addEventListener('DOMContentLoaded', function() { | |
document.querySelector('button').onclick = count | |
}) | |
let counter = 0 | |
function count() { | |
counter++ | |
document.querySelector('#counter').innerHTML = counter | |
if (counter % 10 === 0) { | |
alert(`My Fortnite score is at ${counter}!`) | |
} | |
} |
Author
ehzawad
commented
Feb 9, 2019
let counter = 0
document.addEventListener('DOMContentLoaded', function() {
document.querySelector('button').onclick = function() {
counter++
document.querySelector('#counter').innerHTML = counter
if (counter % 10 === 0) {
alert(`My Fortnite score is at ${counter}!`)
}
}
})
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment