当前位置:网站首页>Async and await
Async and await
2022-07-01 06:26:00 【HHYZBC】
async function
- The return value of the function is promise object
- promise The result of the object is determined by async The return value of the function execution determines
await expression
- await The expression on the right is usually promise object , But it can be something else
- If the expression is promise object , await The return is promise The value of success
- If the expression is another value , Take this value directly as await The return value of
Be careful
- await Must be written in async Function , but async There can be no await
- If await Of promise failed , Will throw an exception , Need to pass through try...catch Capture processing
Because I am not particularly good at front-end learning , So it's about async And await See the link below for more information ,
边栏推荐
- 证券类开户有什么影响 开户安全吗
- 请求模块(requests)
- FPGA - clocking -02- clock wiring resources of internal structure of 7 Series FPGA
- async 与 await
- Self confidence is indispensable for technology
- Detailed steps for installing redis on Windows system
- How did ManageEngine Zhuohao achieve the goal of being selected into Gartner Magic Quadrant for four consecutive years?
- 【ManageEngine卓豪】网络运维管理是什么,网络运维平台有什么用
- C语言课设学生考勤系统(大作业)
- Flink practice -- multi stream merge
猜你喜欢
【ManageEngine】如何实现网络自动化运维
Design of sales management system for C language course (big homework)
Forkjoin and stream flow test
【网络安全工具】USB控制软件有什么用
FPGA - 7 Series FPGA internal structure clocking-01-clock Architecture Overview
async 与 await
[enterprise data security] upgrade backup strategy to ensure enterprise data security
Make Tiantou village sweet. Is Xianjing taro or cabbage the characteristic agricultural product of Tiantou Village
To sort out the anomaly detection methods, just read this article!
Redis安装到Windows系统上的详细步骤
随机推荐
连续四年入选Gartner魔力象限,ManageEngine卓豪是如何做到的?
10 golang operator
SystemVerilog learning-09-interprocess synchronization, communication and virtual methods
[ManageEngine Zhuohao] mobile terminal management solution, helping the digital transformation of Zhongzhou aviation industry
【ManageEngine卓豪】用统一终端管理助“欧力士集团”数字化转型
C language course set up library information management system (big homework)
HCM Beginner (III) - quickly enter pa70 and pa71 to browse employee information PA10
What is a port scanning tool? What is the use of port scanning tools
[unity shader amplify shader editor (ASE) Chapter 9]
One of the characteristic agricultural products that make Tiantou village, Guankou Town, Xiamen into a "sweet" village is
Treasure taking from underground palace (memory based deep search)
[ManageEngine Zhuohao] what is network operation and maintenance management and what is the use of network operation and maintenance platform
C how to print out the original array
async 与 await
idea 好用插件汇总!!!
HCM Beginner (I) - Introduction
Application of IT service management (ITSM) in Higher Education
Pychart configuring jupyter
On siem
MongoDB:一、MongoDB是什么?MongoDB的优缺点