Last active
October 20, 2017 14:07
-
-
Save isacjunior/cdee5cb18eaaf0e7b4aa0fed9d62c29e to your computer and use it in GitHub Desktop.
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
function mapAge(array) { | |
const mapped = [] | |
for (let i = 0; i < array.length; i++) { | |
mapped.push(array[i].age) | |
} | |
return mapped | |
} | |
const mappedAges = mapAge(users) // [26, 55, 29, 49, 19, 25, 26, 32] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment