1、本文档为PDF格式,可预览1~4页文档内容;
2、在管理资源网(M448网站)一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究;
3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您接受了本站规则且自行承担风险,本站不退款、不进行额外附加服务;
4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请拨打举报电话:18242045825(电话支持时间:9:00-18:30),或填加微信Ahead-turner反映;
5、该文档为金牌资料,如果您想要下载,请升级会员服务;
6、购买积分后,可以下载所有标识积分的文档,每次下载扣减积分,积分没有使用期限,用完为止;
7、成为金牌VIP后,可以免费下载标识“积分”或“金牌”字样的文档,每日限制下载30份资料;
8、成为企业VIP后,可以免费下载所有资料文档,每日限制下载50份资料;
9、本站下载文档后不支持退款、换文档,如有疑问请联系我们。
2019/9/5 第?部分:进阶篇 | FE-Interview JS b() // call b console.log(a) // undefined var a = Hello world function b() { console.log(call b) } JS undefined b() // call b second function b() { console.log(call b fist) } function b() { blog.poetries.top/FE-Interview-Questions/improve/#?、js 1/27 2019/9/5 第?部分:进阶篇 | FE-Interview console.log(call b second) } var b = Hello world var let let let let call apply this call apply let a = { value: 1 } function getValue(name, age) { console.log(name) console.log(age) console.log(this.value) } getValue.call(a, yck, 24) getValue.apply(a, [yck, 24]) bind bind window this blog.poetries.top/FE-Interview-Questions/improve/#?、js 2/27 2019/9/5 第?部分:进阶篇 | FE-Interview Function.prototype.myBind = function (context) { if (typeof this !== function) { throw new TypeError(Error) } var _this = this var args = [...arguments].slice(1) // return function F() { // new F() if (this instanceof F) { return new _this(...args, ...arguments) } return _this.apply(context, args.concat(...arguments)) } } Function.prototype.myCall = function (context) { var context = context || window // context // getValue.call(a, yck, 24) => a.fn = getValue context.fn = this // context var args = [...arguments].slice(1) // getValue.call(a, yck, 24) => a.fn(yck, 24) var result = context.fn(...args) // fn delete context.fn return result } Function.prototype.myApply = function (context) { var context = con