myFunction.call(thisArg, arg1, arg2 ...)
I understand that when I use a method calland provide a thisArgvalue thisin a function, it is set for the object to which I pass.
myFunction.bind(thisArg, arg1, arg2 ...)
And the method bind, on the other hand, returns a new function with the context of the thisnew function set for the object to which I am passing.
But I do not understand why to use bindinstead call. If all I want to do is change the context this, callit seems to me sufficient. Then why use bind when it breaks in IE8 and below browsers.
So, when does usage bindbecome a better case compared to call?
source
share