《ES6标准入门》(六)之Promise对象2——then()和catch()方法

1.Promise.prototype.then()方法javascript Promise 实例具备then方法,也就是说,then方法是定义在原型对象Promise.prototype上的。它的做用是为 Promise 实例添加状态改变时的回调函数。then方法的第一个参数是resolved状态的回调函数,第二个参数(可选)是rejected状态的回调函数。 java then方法返回的是一个
相关文章
相关标签/搜索