10 2021 档案
改变this指向的三种手写
摘要:// eslint-disable-next-line no-extend-native Function.prototype.myCall = function (...args) { const target = args[0] target._f = this target._f(...arg 阅读全文
posted @ 2021-10-14 10:23 hhvfg 阅读(50) 评论(0) 推荐(0)
原型的一道題
摘要:// const F = function () {} function F(){} // eslint-disable-next-line no-new-func // const F = new Function() // eslint-disable-next-line no-extend-n 阅读全文
posted @ 2021-10-13 09:26 hhvfg 阅读(33) 评论(0) 推荐(0)