摘要: demon1 function test(){ console.log(b); //undefined if(a){ var b = 100; } console.log(b) ////undefined c = 234; console.log(c) //234 } var a; test(); 阅读全文
posted @ 2023-12-16 17:31 流弊的小涛 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 手写Call Function.prototype.MyCall = function(context){ var context = context ?? window; let fnSymbol = Symbol(); context[fnSymbol] = this; const arg = 阅读全文
posted @ 2023-12-16 16:52 流弊的小涛 阅读(6) 评论(0) 推荐(0) 编辑