Reviewing some code reveals the following:
this.f.call(this);
Or in other scenarios:
this.someObj.f.call(this.someObj);
Is there a distinction between these and:
this.f();
this.someObj.f();
Under what circumstances might the behavior differ? (e.g. if 'this' or 'someObj' is null, not an object, or 'f' is not actually a function? It's hard to determine if one would trigger an exception while the other wouldn't, unless I'm overlooking something...)
EDIT: Clarification - I understand that '.call' can be used to define the 'this' value accessed by the function. It comes in handy when using 'obj.f()' syntax isn't feasible (due to 'f' not being a property of 'obj' or uncertainty about it). My query doesn't delve into the workings of '.call' in general, but rather focuses on this specific case where the rationale behind employing '.call' over the object-property syntax eludes me.