Skip to content

Instantly share code, notes, and snippets.

@devdays
Created December 20, 2014 23:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devdays/200baf52e06879d95b24 to your computer and use it in GitHub Desktop.
Save devdays/200baf52e06879d95b24 to your computer and use it in GitHub Desktop.
Snippet - Underscore Each
var fibarray = new Array( 0, 1, 1, 2, 3, 5, 8, 13);
_.each([fibarray, function(val) {
console.log(val);
});
var oneTwoThree = {one: 1, two: 2, three: 3};
_.each(oneTwoThree, function(val, key){
console.log(val + ": " + key);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment