Skip to content

Instantly share code, notes, and snippets.

@brianyang
Created January 12, 2012 13:34
Show Gist options
  • Save brianyang/1600558 to your computer and use it in GitHub Desktop.
Save brianyang/1600558 to your computer and use it in GitHub Desktop.
loop doesnt return as expected
unexpectedLoop: ->
$('body').children().each setTimeout(console.log('foo'), 1000)
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