We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Function.prototype.bind2 = function (ctx) { var fn = this; var context = ctx; var args = Array.prototype.slice.call(arguments, 1); return function () { var bindArgs = Array.prototype.slice.call(arguments); return fn.apply(context, args.concat(bindArgs)); } }
Function.prototype.bind2 = function (ctx, ...args1) { var fn = this; var context = ctx; var a = args1; return function (...args2) { return fn.apply(context, args1.concat(args2)); } }
var obj = { name: "April" } function getInfo(age, sex) { return { name: this.name, age, sex } } var a = getInfo.bind2(obj, 21, 'girl')();
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Polyfill
ES6
Test
The text was updated successfully, but these errors were encountered: