Created
November 19, 2014 20:42
-
-
Save ohall/bb810c30ce7f4a492d52 to your computer and use it in GitHub Desktop.
map and array with underscore
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
| var collection = [1, 2, 3]; | |
| _.map(collection, function(val, index, array){ return num * 3; }); | |
| // returns array -> [3, 6, 9] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment