Q: with and arguments scope length property with (function(x, undefined){}) length;

Result of the above statement is 2 (console.log(length), what is the explanation ? It's giving the length of arguments why that ?
And why
function f(a,b,c,d) {
    console.log(length);
}

f();

is 0 ? isn't it the same thing ?

A: Your first example is giving the number of arguments in the declaration, which is the definition of Function.length.
Note that this is not the length of arguments, which does not exist except inside the function when it is called.
Your second case is printing the value of window.length, which is the number of frames in the window.
