- 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.
推薦閱讀
- Interactive Data Visualization with Python
- 程序員數學:用Python學透線性代數和微積分
- Mastering Articulate Storyline
- FFmpeg入門詳解:音視頻原理及應用
- HDInsight Essentials(Second Edition)
- H5頁面設計:Mugeda版(微課版)
- Unity Game Development Scripting
- Mastering JBoss Enterprise Application Platform 7
- 深入淺出React和Redux
- 大話Java:程序設計從入門到精通
- ASP.NET Web API Security Essentials
- 深度實踐KVM:核心技術、管理運維、性能優化與項目實施
- 你好!Java
- 網絡綜合布線與組網實戰指南
- Swift 2 Design Patterns