摘要:
function myPromise(constructor){ let self=this; self.status="pending" //定义状态改变前的初始状态 self.value=undefined;//定义状态为resolved的时候的状态 self.reason=undefined; 阅读全文
摘要:
apply Function.prototype.myApply = function(context){ context = context || window context.fn = this var res if(arguments[1]){ res = context.fn(...argu 阅读全文