At noon, I did a little research on the arguments in the javascript function
Observed arguments.length and arguments.callee
First of all, arguments are of course only meaningful within the function body. arguments.length returns the number of actual parameters passed into the function. For example, I did not pass in anything here, but directly ran an anonymous function, then the first alert It must be '0'. Let's look at what arguments.callee returns is the called function itself. For anonymous functions, you can get its own reference through arguments.callee. Here arguments.callee.length returns what the function is expected to pass in. The number of parameters, in this case the second alert is '2'. If this is a named function, such as the function name is mytest, then you can directly use mytest.length to get the number of parameters that should be passed in.