摘要: Function.prototype.mycall = function (ctx, ...args) { ctx = ctx undefined || ctx null ? globalThis : Object(ctx) const fn = this; const key = Symbol(' 阅读全文
posted @ 2024-04-26 15:30 howhy 阅读(8) 评论(0) 推荐(0) 编辑
摘要: function forcall(fun) { console.log(fun) return function f1(...args) { console.log(11, args) if (args.length >= fun.length) { return fun(...args) } el 阅读全文
posted @ 2024-04-26 11:05 howhy 阅读(3) 评论(0) 推荐(0) 编辑