Skip to content

Instantly share code, notes, and snippets.

@5509
Created February 8, 2012 15:37
Show Gist options
  • Save 5509/1770513 to your computer and use it in GitHub Desktop.
Save 5509/1770513 to your computer and use it in GitHub Desktop.
each
function each(arr, func) {
var i = 0,
l = arr.length;
for ( ; i < l; i = i + 1 ) {
func.apply(
arr[i],
([i]).concat(arguments)
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment