在执行第一个await new Promise之后,For循环结束,没有任何代码。如果我理解正确的话,在解析Promise之前,每次迭代都应该暂停2秒,console.log输出指定的字符串,然后迭代结束。我应该如何重写代码以使其按我的预期工作?'use strict';
for (let i = 0; i < 5; i++) {
await new Promise(resol
Is this being used in an async call that was not returned as a promise to the action/intent handler?也许对外部REST的请求(使用请求库)可以算作一个“响应”,也许会导致这个错误?知道为什么会发生这个错误吗?干杯
您认为我需要开始使用异步代码&类似于这个v2片段的承诺吗?在REST查询开始之前,它似乎是空