官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 响水县| 普兰店市| 长寿区| 江孜县| 林周县| 噶尔县| 施秉县| 胶州市| 建德市| 克山县| 呼伦贝尔市| 伊春市| 海伦市| 庆元县| 微博| 云阳县| 泗阳县| 台中县| 南溪县| 南靖县| 酉阳| 修文县| 马尔康县| 额尔古纳市| 得荣县| 禄劝| 汝阳县| 孟连| 上栗县| 马龙县| 石嘴山市| 淳安县| 烟台市| 平南县| 太白县| 朔州市| 永康市| 房山区| 天津市| 体育| 巴里|