Created
November 8, 2013 15:52
-
-
Save tmcw/7373068 to your computer and use it in GitHub Desktop.
This file contains 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
// using reduce | |
var team = posts.team.reduce(function(prev, post, index, list) { | |
prev.push(post.metadata.title); | |
return prev; | |
}, []); | |
// using map | |
var team = posts.team.map(function(post) { | |
return post.metadata.title); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment