Promise异步编程解决方案
摘要:Promise是ES6中新增的异步编程解决方案,体现在代码中它是一个对象,可以通过 Promise 构造函数来实例化。 其最基本的使用 new Promise(function(resolve,reject){}) 传两个参数resolve和reject 然后再逻辑里返回resolve和reject它有两个原型方法Promise.prototype.then()Promise.prototype...
阅读全文
posted @ 2018-04-09 16:20
浙公网安备 33010602011771号