10 2022 档案

摘要:function _create() { //小新(new)闯(创)祸(获)被铁链捆绑遣返 let obj = {};//1.创建一个空对象 创 let constructor = [].shift.call(arguments);//2.获取构造函数 获 obj.__proto__ = const 阅读全文
posted @ 2022-10-30 19:27 我喝牛奶不舔盖 阅读(60) 评论(0) 推荐(0) 编辑
摘要:Function.prototype.myBind = function (context) { // if(!(typeof this == 'function')) { //1.判断调用者是否为一个函数 判 throw new Error('调用者必须是一个函数') } let self = t 阅读全文
posted @ 2022-10-30 00:23 我喝牛奶不舔盖 阅读(57) 评论(0) 推荐(0) 编辑
摘要:Function.prototype.myCall = function(obj) { //靠(call),帮(绑)甜(添)姐(解)执单(删)反(返) let context = obj || window; //1.绑定全局环境 绑 context.fn = this; //2.添加临时属性存储调 阅读全文
posted @ 2022-10-29 16:58 我喝牛奶不舔盖 阅读(64) 评论(0) 推荐(0) 编辑
摘要:Function.prototype.myApply = function(obj, arr) { //记忆:该应用(apply)帮天霸(判)执单(删)反(返) let context = Object(obj) || globalThis; //1.绑定全局环境 绑 context.fn = th 阅读全文
posted @ 2022-10-29 16:52 我喝牛奶不舔盖 阅读(22) 评论(0) 推荐(0) 编辑

I hear and I forget. I see and I remember. I do and I understand
点击右上角即可分享
微信分享提示