Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Asynchronous Programming with JavaScript!
You have completed Asynchronous Programming with JavaScript!
Preview
Each callback adds a level of nesting, and when you have lots of callbacks, the code could get complicated quickly.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
which then executes a callback path to it.
0:00
Then, that function
produces another callback,
0:02
which invokes a function that calls yet
another callback.
0:05
Each callback adds a level of nesting.
0:08
And when you have lots of callbacks,
the code could get complicated quickly.
0:11
This is a small app.
0:15
Now imagine a much larger app where we may
have to do even more things sequentially,
0:16
like have other async tasks that
are dependent on our previous task.
0:21
The nesting isn't too difficult to follow
in our case because the program is mostly
0:25
separated into reusable functions,
each responsible for one major task.
0:29
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