Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
- Chaining Array Methods 3:37
- Method Chaining 1 objective
- Working with Objects in Arrays 7:40
- Working with Objects 1 objective
- Combining filter() and map() 4:13
- Combining filter() and map() 1 objective
- Combining filter() and reduce() 4:42
- Combining filter() and reduce() 1 objective
- Nested Data and Additional Exploration 7:25
- Array Flattening 1 objective
- Nested Data 1 objective
Well done!
You have completed JavaScript Array Iteration Methods!

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
Work some more advanced array problems using the methods you've learned about in this course.
Snippets from the Video
const movies = [
['The Day the Earth Stood Still', 'Superman', 'Ghostbusters'],
['Finding Dory'],
['Jaws', 'On the Waterfront']
]
// Result: ['The Day the Earth Stood Still', 'Superman', 'Ghostbusters', 'Finding Dory', 'Jaws', 'On the Waterfront']
const users = [
{
name: 'Samir',
age: 27,
favoriteBooks:[
{title: 'The Iliad'},
{title: 'The Brothers Karamazov'}
]
},
{
name: 'Angela',
age: 33,
favoriteBooks:[
{title: 'Tenth of December'},
{title: 'Cloud Atlas'},
{title: 'One Hundred Years of Solitude'}
]
},
{
name: 'Beatrice',
age: 42,
favoriteBooks:[
{title: 'Candide'}
]
}
];
// Result: ['The Iliad', 'The Brothers Karamazov', 'Tenth of December', 'Cloud Atlas', 'One Hundred Years of Solitude', 'Candide'];
Using concat to Combine Arrays
In the video we use the spread operator to combine arrays. Here's the same example using the concat array method instead:
const flatMovies = movies
.reduce((arr, innerMovies) => arr.concat(innerMovies), []);
Read more about using concat by following the link below.
MDN Resources
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
Samuel Kleos
Front End Web Development Techdegree Student 13,728 Points1 Answer
-
Kade Rathbun
6,586 Points1 Answer
-
Sam Bailey
8,425 Points1 Answer
-
Joseph Michelini
Python Development Techdegree Graduate 18,692 Points2 Answers
-
PLUS
Begana Choi
Courses Plus Student 13,126 Points1 Answer
-
PLUS
Begana Choi
Courses Plus Student 13,126 Points1 Answer
-
<noob />
17,062 Points1 Answer
-
vamosrope14
14,932 Points1 Answer
-
vincenzo IEVA
Front End Web Development Techdegree Graduate 14,211 Points1 Answer
-
Victor Ibasco
11,035 Points1 Answer
-
yoav green
8,611 Points1 Answer
-
Peter Retvari
Full Stack JavaScript Techdegree Student 8,392 Points1 Answer
-
Peter Retvari
Full Stack JavaScript Techdegree Student 8,392 Points2 Answers
-
Michael Chambers
Full Stack JavaScript Techdegree Graduate 28,393 Points1 Answer
-
Sam Gord
14,084 Pointsplease check my answer to the first challenge, did it another way.
Posted by Sam GordSam Gord
14,084 Points1 Answer
-
Tony Brackins
28,766 Points1 Answer
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up