diff --git a/answers/bind-a.js b/answers/bind-a.js index 379c54a..6ace107 100644 --- a/answers/bind-a.js +++ b/answers/bind-a.js @@ -1,6 +1,5 @@ Function.prototype.bind = function(context) { - const _this = this; - return function() { - _this.apply(context); + return (...args) => { + return this.apply(context, args); } }