Created
July 11, 2016 19:38
-
-
Save davidalves1/5f47b576c12dc0ab08c368d80f36f85e to your computer and use it in GitHub Desktop.
Cronômetro JS
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
var s = 0; | |
var m = 0 | |
var t = window.setInterval(function() { | |
console.log((parseInt(s).toFixed(0)) + ':' + m); | |
s += 0.1; | |
m = m === 9 ? 0 : m + 1; | |
}, 100); | |
window.setTimeout(function() { | |
clearInterval(t); | |
}, 3100); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment