Asynchronous JavaScript: Promises, Callbacks, Async Await

Asynchronous JavaScript: Promises, Callbacks, Async Await

English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 50 lectures (4h 2m) | 849 MB

Become an expert in Asynchronous JavaScript: Promises, Callbacks, Async Await, Event Loop, etc.

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!

What you’ll learn

  • Learn fundamental concepts of Asynchronous JavaScript
  • Everything you need to know about JavaScript Promises
  • Using callbacks: Pros and Cons, when to use and how to test
  • Async / Await – the new way of handling asynchronous operations in JavaScript
  • In-depth understanding of the Event Loop
  • Learn how JavaScript Engine executes code behind the scenes
  • Unit Testing of asynchronous functions
  • No fluff, direct and to the point
  • Github repository
Table of Contents

Introduction
1 Introduction
2 Structure of This Course

Difference Between Synchronous And Asynchronous Actions
3 What Is Asynchronicity
4 Typical Example of an Asynchronous Action in JavaScript
5 Synchronous vs Asynchronous in JavaScript
6 Quick Note about Github Repository
7 Event Loop in JavaScript Call Stack and Task Queue
8 Lets Fix Our Example

Callbacks In JavaScript
9 What Is a Callback In JavaScript
10 Callbacks Are Not Always Asynchronous
11 How To Handle Errors In Asynchronous Code
12 Pros & Cons Of Callbacks
13 Callback Examples In JavaScript Libraries
14 Callbacks Lack Readability
15 Making HTTP Requests From Your Browser
16 Callback Hell

Testing Asynchronous Callbacks
17 Setting Up Testing Environment
18 Testing Callback Functions With Mocha And Chai

Promise In JavaScript
19 What Is a Promise In JavaScript
20 How To Create A New Promise
21 Final States Of The Promise
22 How To Use JavaScript Promises Then Method
23 Rewriting calculateSquare Function Using Promises
24 How To Promisify Any JS Function
25 Chaining Promises
26 Making HTTP Requests Using Fetch API
27 How To Avoid Callback Hell
28 Handling Promise Rejections
29 Promiseresolve And Promisereject
30 Executing Promises In Parallel Promiseall
31 How Promiseall Handles Rejections
32 Promiseall Implementing From Scratch
33 Executing Promises In Parallel PromiseallSettled
34 PromiseallSettled Implementing From Scratch
35 Which Promise Is Faster Promiserace
36 Getting First Successful Promise Promiseany
37 Promiserace Implementing From Scratch
38 Promiseany Implementing From Scratch

Testing Promises In JavaScript
39 Setting Up Testing Environment
40 Testing JavaScript Promises Using Mocha And Chai
41 Timeouts In Mocha
42 Making Multiple Promise Assertions In One Test

Async Await in JavaScript
43 Async Functions in JavaScript
44 Await Keyword in JavaScript
45 Using Async Await with Fetch API
46 Top Level Await
47 Handling Errors Using Async Await
48 Sequential vs Parallel Execution

Summary
49 Summary
50 Bonus Lecture Other Courses with Discounts

Homepage