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

116 Просмотры
Издатель
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
https://www.youtube.com/watch?v=Wx2o-lnS8Bk

▶ JavaScript Array Methods
https://www.youtube.com/playlist?list=PL1TrjkMQ8UbU_im9BEBp1ap921-MFhR2H

▶ Vue 2 Basics Beginner Tutorial
https://www.youtube.com/playlist?list=PL1TrjkMQ8UbUb6enU-ESsbngYBLbE_sG4

▶ Vue.js 2 Components, Beginners tutorial
https://www.youtube.com/playlist?list=PL1TrjkMQ8UbVu4dvX2gtyZQ0FxAsA48jB

▶ Vuex tutorial (Vue.js state management)
https://www.youtube.com/playlist?list=PL1TrjkMQ8UbVSDkDaLkjpeNGkblNU8rpW

▶ Vue.js 3 Tutorial
https://www.youtube.com/playlist?list=PL1TrjkMQ8UbWg8f8EpkpZntxdQldkBipE

Support my work:
1. On BuyMeACoffee: https://www.buymeacoffee.com/qirolab
2. On Patreon: https://www.patreon.com/qirolab

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