Skip to content

Instantly share code, notes, and snippets.

@richardsweeney
Last active December 16, 2015 10:49
Show Gist options
  • Save richardsweeney/5423088 to your computer and use it in GitHub Desktop.
Save richardsweeney/5423088 to your computer and use it in GitHub Desktop.
Lovely JS loop :: Remy Sharp to blame
var nodes = [ 1, 2, 3, 4, 5 ],
length = nodes.length,
i = 0;
for ( ; i < length; i++ ) {
( function ( node ) {
// oooohhhh!
})( nodes[i] );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment