题解 | #Function.bind#
Function.bind
https://www.nowcoder.com/practice/ecad0164931847f78c55278cee56e544
Function.prototype._bind = function (context, ...args) { let arg = args ? args : []; let _this = this; const fbound = function (...innerArgs) { return _this.apply(this instanceof fbound ? this : context, [ ...args, ...innerArgs, ]); }; fbound.prototype = this.prototype; return fbound; };