手寫call、apply

在Function的prototype添加myCall和myApply 方法javascript Function.prototype.mycall = function (ctx,...args){ cxt = ctx||window; var fn = Symbol(); cxt[fn] = this; var result = cxt[fn](...args)
相關文章
相關標籤/搜索