
Introduction.
Let's talk about the structure of the course.
In this video we will look at an example of doing things asynchronously in normal human life.
In this video we will look into one of the typical examples of an asynchronous action in JavaScript.
In this video, we will have a look at the difference between synchronous and asynchronous actions.
In this video we will have a look how JavaScript engine executes our code behind the scenes.
In this video we will fix our example from one of the previous videos.
In this video we will look at the definition of a callback.
We will look into 2 examples of callbacks: one is asynchronous, and another one is not.
In this video you will see that you should follow a different approach when handling errors in asynchronous code.
In this video we are going to talk about pros and cons of callbacks.
We will look into 4 examples of using callbacks from some of the most popular JavaScript libraries.
Sometimes you might get an error when making HTTP requests from your browser. This lesson explains how to avoid/fix those errors.
In this video we will look at what people typically call a Callback Hell.
In this video we will setup a testing environment for testing callbacks.
In this video I will show you how you can write unit tests for asynchronous functions that use callbacks
In this video we will talk about promises. And first question is "What is a promise?".
In this video we will see how we can create a promise.
In this video we will learn about the final states of the promise.
In this video we will see how we can use promises.
In this video we will take our calculateSquare function, previously using callbacks, and rewrite it to promises.
In this video you'll learn how to promisify functions. You can promisify any function in JavaScript, but usually it makes most sense to promisify asynchronous functions that are using callbacks at the moment.
In this video I will show you how you can chain several promises.
We will make HTTP Requests using promise-based Fetch API.
In this video I will show you how you can avoid callback hell if you use promises.
In this video we will learn how to handle promise rejections.
In this video we are going to talk about Promise.resolve and Promise.reject.
In this video we will talk about executing several promises in parallel.
In this video we will talk about how Promise.all handles rejections.
Sometimes during JavaScript interviews you might be asked to implement Promise.all or other Promise Concurrency methods from scratch. In this video you will see how you can implement Promise.all from scratch.
In this video we will talk about Promise.allSettled and how it is different from Promise.all.
During some job interviews you might be asked to implement Promise.allSettled from scratch. In this video you will see how you can do it.
In this video we will talk about how to run several promises in parallel and get the result from the fastest one.
In this video we are going to talk about how to run multiple promises in parallel and get the result from the fastest one that succeeds.
During some job interviews you might be asked to implement Promise.race from scratch. In this video you will see how you can do it.
During some job interviews you might be asked to implement Promise.any from scratch. In this video you will see how you can do it.
In this video we will set up a testing environment needed for testing promises.
In this video we will add some tests for promises.
In this video we will talk about timeouts in Mocha.
In this video we will talk about making multiple promise assertions in one test case.
In this video we are going to check if all asynchronous tasks have the same priority by looking at a few examples.
In this video we are going to have a closer look at one of the key data structures behind the Event Loop. I am talking about the Task Queue.
In this video we are going to have a look how exactly long tasks can affect user experience in your applications.
In this video we are going to see how we can handle very long tasks in JavaScript.
In this video you will learn about Microtasks.
In this video we are going to see how exactly JavaScript Engine executes the code from our initial example discussed at the beginning of this Section.
In this video you will learn about one more aspect of Event Loop related to handling Animations.
In this video you will see an example of how you can use requestAnimationFrame function in order to create Animations in JavaScript.
In this video we will do a quick recap of how Event Loop works in the Browser.
Bonus Lecture is a place where instructors can provide links to other courses and give discounts to students.
My main goal is to help you master Asynchronous JavaScript. This course was specifically designed for those who want to improve their skills in Callbacks, Promises, Async Await, and Event Loop. This course was designed to be easy to understand, and therefore there are a lot of visuals in it, especially when we are talking about important concepts. You will also see a lot of coding examples along the way.
We will be talking about 3 main components of Async JavaScript: Callback functions, Promises, and Async Await.
Callbacks in JavaScript are used everywhere. Creating event handlers, making HTTP requests, interacting with the DOM, setting timeouts, reading or writing data to the filesystem, working with databases, etc. I am pretty sure you are already using callbacks in your code, but I am not sure if you know how they actually work... Knowing how things really work will help you write your code faster and avoid weird bugs.
Promises were created as a better alternative to callbacks. They don't have drawbacks that callbacks have. JavaScript promises are incredibly helpful when you have several asynchronous operations that depend on each other. However, promises are a new concept which you have to learn, and this course will help you with that.
Async Await is a syntactic sugar around Promises introduced in EcmaScript 8. Before that writing asynchronous code in JavaScript was very different from writing ordinary synchronous code. Async await allows you to structure all your code in a similar way, no matter if it's synchronous or asynchronous.
There is a lot of asynchronous stuff going on in popular JavaScript libraries and frameworks: React, Angular, Vue.js, jQuery, etc. In NodeJS it's almost impossible to write anything without using asynchronous operations. After watching this course you will be able to read and write asynchronous JavaScript code effectively, and you will definitely understand how it works behind the scenes!
P. S. Made in Ukraine