javaScript 必知必會

Promise好好用 1. 並行請求,等待多個異步請求結束後處理結果 2. 數組中包含某一個元素 ES6 3. 在`` 後面添加一個`` 1. 並行請求,等待多個異步請求結束後處理結果 const detail = 一個異步請求 const comments = 另外一個異步請求 Promise.all([detail,comments]).then(res=>{ //這裏就是等待兩個異步
相關文章
相關標籤/搜索