- 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.
推薦閱讀
- Rust編程從入門到實戰(zhàn)
- AngularJS Web Application Development Blueprints
- 我的第一本算法書
- C語言程序設(shè)計立體化案例教程
- Big Data Analytics
- Learn React with TypeScript 3
- Go語言開發(fā)實戰(zhàn)(慕課版)
- Natural Language Processing with Python Quick Start Guide
- Java程序設(shè)計基礎(chǔ)(第6版)
- Clojure Polymorphism
- Functional Python Programming
- C# 7.1 and .NET Core 2.0:Modern Cross-Platform Development(Third Edition)
- Java 11 and 12:New Features
- Software Architecture with Python
- Socket.IO Cookbook