Created
October 24, 2013 23:15
-
-
Save ajcrites/7146810 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
/** | |
* This prints out "10" every second | |
* Update the code to print 0..9 | |
*/ | |
var x; | |
for (x = 0; x < 10; x++) { | |
setTimeout(function () { | |
console.log(x); | |
}, x * 1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment