Asynchronus Programming in JavaScript - Tutorial
Zenva
ACCESS the FULL COURSE here: https://academy.zenva.com/product/full-stack-web-development-mini-degree/?zva_src=youtube-description-asyncjavascript
Master intermediate JavaScript techniques with asynchronous programming!
When a computer runs a block of code, it generally does so in the order the code was written. This is to prevent unintended consequences that might occur otherwise if the instructions given to the machine were not followed in a particular order.
However, for beginners, you'll quickly find this can also be problematic in certain situations - particularly in cases where you're using external APIs. For example, when loading a web page, you may require data from a separate file or third party in order to render the content. With "normal" programming methods, this means your page is going to block other aspects of loading until that data is obtained, slowing the entire process down.
With asynchronous programming, though, you can easily overcome the obstacle. Asynchronous programming is a method of programming where you set up parallel blocks of code to run in conjunction with the main thread. This process allows you to do things - like get third-party API data - without interrupting other loading processes that are not relying on that data.
In this free tutorial, we're going to cover some of the fundamental knowledge you'll need for async programming in JavaScript. You'll first explore the async function itself, how it works, and how it differs from Promises - another async method in JavaScript. After, you'll also learn how to handle errors to make sure you can properly verify your parallel units of code.
If you're keen on becoming a web developer, or just work with JavaScript in general, async programming is one of the most important concepts you will have to learn. Not only will it allow you to make efficient code, but ensure that users receive a smooth and speedy experience.
JavaScript experience is recommended for this tutorial before you start! ... https://www.youtube.com/watch?v=viZWFwCCCeA
10695463 Bytes