Created
January 12, 2012 13:34
-
-
Save brianyang/1600558 to your computer and use it in GitHub Desktop.
loop doesnt return as expected
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
unexpectedLoop: -> | |
$('body').children().each setTimeout(console.log('foo'), 1000) |
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
unexpectedLoop = function (){ | |
$('body').children().each( | |
function(){ | |
setTimeout(console.log('foo'), 1000) | |
}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment