.call
method exits on any function, which will refer to Function.prototype.call
for example:
console.log.call === Function.prototype.call // call
Also it means that
Function.prototype.call === Function.prototype.call.call
Question:
console.log.call.call.call.call.call.apply(a => a, [1, 2]) // ?
the same as:
Function.prototype.call.apply(a => a, [1, 2])
the same as: thisPointer.method(params)
, and thisPointer
is a => a
, method
is .call
(a => a).call(1, 2)
So the result is 2