Asynchronous JavaScript: Promises, Callbacks, Async Await

Asynchronous JavaScript: Promises, Callbacks, Async Await
Asynchronous JavaScript: Promises, Callbacks, Async Await
English | MP4 | AVC 1280×720 | AAC 48KHz 2ch | 3 Hours | 1.0 GB

Everything about JavaScript Promises, Callback functions, Async Await, and Event Loop

My main goal is to help you understand and learn 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

  • No fluff, direct and to the point
  • Learn fundamental concepts of Asynchronous JavaScript
  • Everything about JavaScript Promises
  • Callback functions: pros & cons, when to use and how to test
  • Async Await – the new way of handling asynchronous operations in JavaScript
  • Event Loop
  • How JavaScript engine executes code behind the scenes
  • Unit testing of asynchronous functions
Table of Contents

Introduction
1 Introduction
2 Structure Of This Course

Difference Between Synchronous And Asynchronous Actions
3 Typical Example of an Asynchronous Action in JavaScript
4 Synchronous vs Asynchronous in JavaScript
5 Event Loop in JavaScript. Call Stack and Message Queue
6 Let’s Fix Our Example

Callback Function In JavaScript
7 What Is Callback In JavaScript
8 Callback Function Is Not Always Asynchronous
9 How To Handle Errors In Asynchronous Code
10 Pros & Cons Of Callback Function
11 Callback Examples In JavaScript Libraries
12 Callbacks Lack Readability
13 Callback Hell In JavaScript

Testing Callback Functions
14 Setting Up Testing Environment
15 Testing Callback Functions With Mocha And Chai

Promise In JavaScript
16 What Is JavaScript Promise
17 Promise.resolve And Promise.reject
18 Executing Promises In Parallel Promise.all Method
19 How Promise.all Handles Rejections
20 Which Promise Is Faster Promise.race Method
21 How To Create A New Promise
22 Final States Of The Promise
23 How To Use JavaScript Promise. Then Method
24 Rewriting calculateSquare Function Using Promises
25 Chaining Promises In JavaScript
26 Making HTTP Requests Using Fetch API
27 How To Avoid Callback Hell
28 Handling Promise Rejections

Testing Promises In JavaScript
29 Setting Up Testing Environment
30 Testing JavaScript Promises Using Mocha And Chai
31 Timeouts In Mocha
32 Making Multiple Promise Assertions In One Test

Async Await in JavaScript
33 Async Function in JavaScript
34 Await Keyword in JavaScript
35 Handling Errors Using Async Await
36 Sequential vs Parallel Execution

Summary
37 Summary
38 Bonus Lecture Other Courses with Discounts