Modern JavaScript const obj1 = { a: 'hello', say() { console.log(this.a, ...arguments); } }; const obj2 = { a: 'buy' }; // test obj1.say.bind(obj2, 'friend', '!')(); The task is to implement a simple .bind polyfill for old browsers Functional way function _bind(func, ctx) { var slice = Array.prototype.slice; if (arguments.length < 2) { return func.apply(ctx); } return func.apply(ctx, slice.call(arguments, 2)); } // test _bind(obj1.say, obj2, 'ttt', 'aaa'); Extending Function.prototype Function.prototype._bind = function(ctx) { const args = Array.prototype.slice.call(arguments, 1); const that = this; return function() { return that.apply( ctx, args.concat(Array.prototype.slice.call(arguments)) ); }; }; // test obj1.say._bind(obj2, 'yyy', 'ccc')();