ES6中Promise、async&await從入門到精通!

一、Promise 對象 ①:Promise能夠看做爲一個容器,容器內部裝着將來纔會結束的異步操做;javascript ②:Promise用於三種狀態:pending(進行中)、fulfilled(已成功)和rejected(已失敗);java ③:狀態一旦開始,只有兩種可能:從 pending 變爲 fulfilled 和從 pending 變爲 rejected,且只會有一個最終結果;數組
相關文章
相關標籤/搜索