Last active
May 30, 2018 08:51
-
-
Save deanvanniekerk/657d3a373a3f5d3189c9d66fac87af58 to your computer and use it in GitHub Desktop.
alchemylab - snip4
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
let element = document.getElementById('root'); | |
counter(element); |
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
function counter(element) { | |
let count = 1; | |
setInterval(function() { | |
element.innerHTML = count.toString(); | |
count++; | |
}, 1000) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment