ES6的基础知识(三)
promise<pre<code//resolve()会触发then方法第一个回调,reject()会触发then方法第二个回调或catch方法letpnewPromise((resolve,reject)>{setTimeout(()>
promise<pre<code//resolve()会触发then方法第一个回调,reject()会触发then方法第二个回调或catch方法letpnewPromise((resolve,reject)>{setTimeout(()>