Recently went to the interview, with the interviewer chatted a lot of things on the basis of JS, one of the problems is to talk about apply, call, bind understanding and differences. Suddenly a Leng, apply, call I know, often use things, bind is what ghost!!! It seems like I've seen it, I've read a similar article, but ... No, I don't remember. Is it the same bind as jquery's event binding ...
Since I do not know, then the summary of the next ~
I. Apply and call
Referring to this, I would probably take notes. In JavaScript, the point of this is a problem that is often addressed,
Instead, apply and call are used to handle the point of the function's body this when the function is executed. So the use of apply and call is consistent, that is, to change and determine the function execution when the this point, the difference is that after the argument is an array, call is a bunch of parameters.
A brief talk on the JavaScript bind method