Check out a free preview of the full Rethinking Asynchronous JavaScript course
The "Exercise 5 & 6" Lesson is part of the full, Rethinking Asynchronous JavaScript course featured in this preview video. Here's what you'd learn in this lesson:
In these exercises, you will use the Asynquence library to get the list of files. For exercise 5, the Asynquence will replace the code in exercise 3. Exercise 6 will apply Asynquence to the exercise 4 solution.
Transcript from the "Exercise 5 & 6" Lesson
[00:00:00]
>> [MUSIC]
[00:00:03]
>> Kyle Simpson: The next two exercises, I'm actually gonna assign exercise five and six together. And here's what they are, exercise five is exactly the same thing as exercise three. Remember we did the promise chain? But now exercise five invites you to use a sequence to create a chain. Exercise six is exactly the same as exercise four, where we did map and reduce.
[00:00:28]
But it invites you to use a sequence in a looping fashion, and you'll find out that it's easier to do. You don't even need to reduce, you can do it with two maps using a sequence. So both of those exercises are designed to give you some time to get more comfortable with a sequence using it, so that we can use it throughout the rest.
[00:00:48]
I will say this, basically what we're gonna do is just stop for the next 20 minutes to let you work on the exercises. If you're already familiar with a sequence, or if you don't really care about it, consider the two exercises optional. But they are designed to let you go back and do what you just did but with a sequence to kind to get more familiar with it.
[00:01:07]
So you should be able to compare the solutions between three and five, and four and six, pretty straightforwardly.
Learn Straight from the Experts Who Shape the Modern Web
- In-depth Courses
- Industry Leading Experts
- Learning Paths
- Live Interactive Workshops