Last active
July 31, 2020 13:31
-
-
Save seandaniel/bdd4d653eab89d4adba32dcf28cb9ab8 to your computer and use it in GitHub Desktop.
2. Return movies directed by Quentin Tarantino
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 quentinTarantinoMovies = movies.filter((movie) => { | |
return movie.director === 'Quentin Tarantino'; | |
}); | |
console.log(quentinTarantinoMovies) | |
// [ | |
{ | |
name: "Inglourious Basterds", | |
releaseDate: 2009, | |
genre: ['Adventure', 'Drama', 'War'], | |
rating: 8.3, | |
director: 'Quentin Tarantino' | |
}, | |
{ | |
name: "Django Unchained", | |
releaseDate: 2012, | |
genre: ['Drama', 'Western'], | |
rating: 8.4, | |
director: 'Quentin Tarantino' | |
}, | |
]; | |
// equivalent to lines 1-3 | |
const quentinTarantinoMovies = movies.filter(movie => movie.director === 'Quentin Tarantino'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment