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

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.

主站蜘蛛池模板: 临城县| 双流县| 雅安市| 土默特右旗| 莱阳市| 将乐县| 扎鲁特旗| 乌拉特中旗| 墨脱县| 潮安县| 会昌县| 旅游| 磐安县| 弥勒县| 调兵山市| 合水县| 彭州市| 辉南县| 新平| 象山县| 鄂尔多斯市| 北海市| 鸡泽县| 九龙城区| 报价| 上高县| 温泉县| 文化| 荣成市| 永胜县| 左权县| 新巴尔虎右旗| 阳城县| 疏附县| 左云县| 吉水县| 沧州市| 东宁县| 新闻| 永州市| 太和县|