We can know or call it self ago by the "arguments.callee" property of function.
Demo1:
Source:
function calleeLengthDemo(arg1, arg2) {
if (arguments.length==arguments.callee.length) {
window.alert("The length of the passed parameters is correct!");
return;
} else {
s = "The length of the real passed parameters is "+arguments.length;
s += "\nThe length of the formal parameters is "+arguments.callee.length;
alert(s);
}
}
calleeLengthDemo();
Result: