Promise

ES6常用方法总结—Promise

1.Promise用法 Promise的then方法会返回一个新的Promise let p = function(){ return new Promise((resolve, reject) => { try { setTimeout(()=>{ return resolve() },500) } catch (error) { return reject(error) } ...

加载中...