手写一些方法
instanceof
1 | function _instanceof(left, right) { |
new
1 | function factory(fn, ...args) { |
call
1 | Function.prototype._call = function(context, ...args) { |
apply
1 | Function.prototype._apply = function(context, ...args) { |
bind
1 | Function.prototype._bind = function(context, ...args) { |