js-面试,手写代码系列:bind,call,apply,new
bind
Function.prototype._bind = function (thisArg, ...rest) { |
call
Function.prototype._call = function (thisArg, ...rest) { |
apply
Function.prototype._apply = function (thisArg, rest) { |
new
function _new(constructor, ...rest) { |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 kshao-blog-前端知识记录!
评论