scrimba
Frontend Career Path
Essential JavaScript concepts
Meme Picker
Aside: filter() 2
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

To see this lesson you need to be logged in. Joining Scrimba is free and gives you access to 20+ courses.Sign up
AboutCommentsNotes
Aside: filter() 2
Expand for more info
index.js
run
preview
console
const series = [
{
name: 'The Wire',
location: 'Baltimore',
lengthInHours : 60,
genres: ['action', 'thriller', 'detective', 'suspense']
},
{
name: 'Game of Thromes',
location: 'Westeros and Essos',
lengthInHours : 70.25,
genres: ['fantasy', 'action', 'tragedy']
},
{
name: 'Friends',
location: 'New York',
lengthInHours : 85,
genres: ['comedy', 'romance', 'drama']
},
{
name: 'The Walking Dead',
location: 'Atlanta',
lengthInHours : 131,
genres: ['zombie', 'apocalypse', 'thriller', 'suspense']
},
{
name: 'The Big Bang Theory',
location: 'Pasadena',
lengthInHours : 139.66,
genres: ['comedy', 'nerd', 'romance']
},
]

/*
Challenge:
1. Use the .filter() method to create an array
of all of the thrillers.
*/
Console
[
{name:
"The Wire"
, location:
"Baltimore"
, lengthInHours:
60
, genres:
[
"action"
,
"thriller"
,
"detective"
,
"suspense"
]
}
,
{name:
"The Walking Dead"
, location:
"Atlanta"
, lengthInHours:
131
, genres:
[
"zombie"
,
"apocalypse"
,
"thriller"
,
"suspense"
]
}
]
,
/index.html
-4:51