若將Promise 物件傳給await 運算式,它會等待Promise 解析並回傳resolve 後的值。 function resolveAfter2Seconds(x) { return new Promise ...
確定! 回上一頁