热门

最新

红包

立Flag

投票

同城

我的

发布
jackhuang2015
半日晴天半日雨
5 年前
truejackhuang2015

培育出的绿萝新品种“黄萝”

CSDN App 扫码分享
分享
评论
2
打赏
  • 复制链接
  • 举报
下一条:
bind方法实现:Function.prototype.bind = function(context, ...args) { if (typeof this !== 'function') { throw new Error("Type Error"); } // 保存this的值 var self = this; return function F() { // 考虑new的情况 if(this instanceof F) { return new self(...args, ...arguments) } return self.apply(context, [...args, ...arguments]) }}
立即登录