They will be the same:
function f(a) { return a} console.log(f(1));
And here for an explanation:
Function.prototype.call
According to spec , Function.prototype.call returns an abstract Call operation (func, thisArg, argList).
Therefore, f.call(null, 1) will return the abstract operation Call (f, null, 1), where f is the called function, null is the context from which it is called, and 1 is the argument passed to f. This will give you the desired result.
Based on this, Function.prototype.call(f, null, 1) will cause an abstract operation (Function.prototype, f, null, 1) to be called, where Function.prototype is the called function, f is the context, and null and 1 - arguments passed to Function.prototype function. Of course, this will not work as intended.
Function.prototype.call.call
However, Function.prototype.call.call(f, null, 1) will return an abstract call operation Call (Function.prototype.call, f, null, 1), where Function.prototype.call is the function that will be called, f - this is the context from which it is called , and null and 1 are passed as arguments.
So what would it look like?
Well, since f is a context, and a call is a function called with (null, 1), the end result is identical: f.call(null, 1) .