Async/await in Javascript & How async-await works in js?

115 Просмотры
Async/await is a new way to write asynchronous code. Async/await is actually just syntax sugar built on top of promises. It makes asynchronous code look and behaves a little more like synchronous code.

Thumb Rules for async-await:
1. `async` functions return a promise.
2. `await` pauses the code execution within the `async` function.
3. There can be multiple `await` statements within a single `async` function.
4. `await` only pauses the code execution within the `async` function. It makes sure that the next line is executed when the promise resolves.

#Javascript #Promise #Async #Await

⌚ Timestamps:
00:00 Introduction
00:58 Async
02:27 Await

▶ Javascript Promise

▶ JavaScript Array Methods

▶ Vue 2 Basics Beginner Tutorial

▶ Vue.js 2 Components, Beginners tutorial

▶ Vuex tutorial (Vue.js state management)

▶ Vue.js 3 Tutorial

Support my work:
1. On BuyMeACoffee:
2. On Patreon:

Язык программирования Swift
Комментариев нет.