本文参考自:https://www.cnblogs.com/YMaster/p/6920441.html
async/await 规则:
-
async 表示这是一个 async 函数,而 await 只能在这个函数里面使用。
-
await 表示在这里等待 await 后面的操作执行完毕,再执行下一句代码。
- await 后面紧跟着的最好是一个耗时的操作或者是一个异步操作。
本文参考自:https://www.cnblogs.com/YMaster/p/6920441.html
async/await 规则:
async 表示这是一个 async 函数,而 await 只能在这个函数里面使用。
await 表示在这里等待 await 后面的操作执行完毕,再执行下一句代码。