标签: javascript node.js promise
为什么这会引发错误?
[x, y] = await Promise.all([ this.somefunction1(), this.somefunction2() ]);
但这不是吗?
let [a, b] = await Promise.all([ this.somefunction1(), this.somefunction2() ]); x = a y = b
作为参考,x和y是在函数范围内定义的变量。