[egghead.io] Asynchronous Programming: The End of The Loop

Share
 

This series is archived ("Inactive feed" status)

Please note series archiving is a new, experimental, feature of Player FM with the aim of helping users understand how we fetch series and report on any issues.

When? This feed was archived on October 09, 2017 15:41 (). Last successful fetch was on September 02, 2017 17:07 ()

Why? Inactive feed status. Our servers were unable to retrieve a valid podcast feed for a sustained period.

What now? You might be able to find a more up-to-date version using the search function. This series will no longer be checked for updates. If you believe this to be in error, please check if the publisher's feed link below is valid and contact support to request the feed be restored or if you have any other concerns about this.

Manage series 1251720
By Discovered by Player FM and our community — copyright is owned by the publisher, not Player FM, and audio streamed directly from their servers.
Learning how to build and manage asynchronous programs is perhaps the most important part of becoming an effective JavaScript programmer. Unlike most programming languages, JavaScript is single-threaded. As a result, JavaScript programs must use async APIs to stay responsive to user input while performing long-running tasks like server requests and animations. You can't get very far in a JavaScript program without running across an asynchronous API. Async programming may seem daunting. How can we write programs that accept user input, run animations, and send server requests over the same period of time? How do we keep the code clear and concise? How do we gracefully propagate and handle asynchronous errors? How can we avoid memory leaks caused by dangling event handlers? JavaScript's loops and try/catch keywords are no help - they only work on synchronous functions.Here's the good news: **Asynchronous programming is much easier than it seems**. The key is to think differently about events. It is possible to build most asynchronous programs using a handful of simple functions. We will learn why most JavaScript developers approach asynchronous programming the wrong way, and how to avoid these common mistakes. By the end of these lessons you will know the tools, concepts, and libraries required to be an asynchronous programming ninja!In this section, we'll learn the first secret to mastering asynchronous programming: **programming without loops**. JavaScript's loops can only run synchronously, and cannot be used to repeat asynchronous functions. As a result, in order to master asynchronous programming we must first master programming without loops. In this series we will learn how to program Arrays without loops using just a few simple functions.

9 episodes available. A new episode about every 0 hours averaging 6 mins duration .