What is the first argument to call, apply, and bind?
The this value. fn.call(thisArg, arg1, arg2). fn.apply(thisArg, [arg1, arg2]). fn.bind(thisArg, arg1, arg2). If you do not care about this, pass null.
Verify This Answer
Cross-check this information using these trusted sources:
More FAQs in Common Mistakes with call, apply, and bind
call takes comma-separated arguments: fn.call(obj, arg1, arg2). apply takes an array: fn.apply(obj, [arg1, arg2]). Both invoke immediately with the specified this.
No. bind returns a new function with this bound. You must call it separately. This is the key difference from call and apply, which invoke immediately.
No. The first bind wins. bound.bind(newObj) does not change this. The bound function keeps the original this from the first bind call.
Still have questions?
Browse all our FAQs or reach out to our support team
