Last active
July 31, 2020 13:30
-
-
Save seandaniel/53a39267fb220a6a5d39fb4c9ac98373 to your computer and use it in GitHub Desktop.
1. Return movie names
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
const movieNames = movies.map((movie) => { | |
return movie.name; | |
}); | |
console.log(movieNames); | |
// [ | |
"Good Will Hunting", | |
"Parasite", | |
"The Shawshank Redemption", | |
"Inglourious Basterds", | |
"The Grand Budapest Hotel", | |
"Django Unchained", | |
"Moneyball" | |
] | |
// equivalent to lines 1-3 | |
const movieNames = movies.map(movie => movie.name); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment