- Server Side development with Node.js and Koa.js Quick Start Guide
- Olayinka Omole
- 99字
- 2021-06-10 18:57:12
What is async… await?
Asynchronous functions are functions that work asynchronously. They return a Promise class implicitly and can run concurrently. We will be discussing two major ways to define asynchronous functions. These include the following:
- Using the native Promise class
- Using the modern Async keyword
The await keyword is used inside an asynchronous function to resolve a promise. Async and await are usually used together for managing the control of flow in a modern asynchronous JavaScript application. Koa relies heavily on async.. await to avoid callback hell and provide a more convenient method for handling errors.
推薦閱讀
- 零基礎學Visual C++第3版
- Kali Linux Web Penetration Testing Cookbook
- LabVIEW2018中文版 虛擬儀器程序設計自學手冊
- Linux C/C++服務器開發(fā)實踐
- Python爬蟲開發(fā):從入門到實戰(zhàn)(微課版)
- BeagleBone Media Center
- HBase從入門到實戰(zhàn)
- Python高級編程
- Learning SQLite for iOS
- Python機器學習實戰(zhàn)
- Java程序設計
- Bootstrap 4 Cookbook
- Learning Hadoop 2
- Webpack實戰(zhàn):入門、進階與調優(yōu)(第2版)
- LabVIEW數(shù)據采集