I am not at all able to decode the output for this js code snippet. The output actually shows 3 . I expected output to be 4. Can someone please explain what is going on here, or am I missing some crude concept of javascript.
var length = 4;
function callback() {
console.log(this.length);
}
const object = {
length: 5,
method() {
arguments[0]();
}
};
object.method(callback, 1, 2);