Function.prototype.bind1 = function () { // const args = Array.from(arguments); const args = Array.prototype.slice.call(arguments); const target = args.shift(); const self = this; return function () { const newArgs = Array.from(arguments); return self.apply(target, [...args, ...newArgs]) } }