async 異步執行的實現

const A = _ => new Promise((res, rej) => { // 設置A函數返回promise對象 setTimeout(function() { console.log('1') res('2') }, 1000); }) const B = async function() {
相關文章
相關標籤/搜索