That's how JS works. You can pass as many extra parameters as you want (they get discarded) and you can also omit as many parameters as you want (it's like passing undefined).
The array-like `arguments` object will always reflect what was actually passed to the function though.
Comments
That's how JS works. You can pass as many extra parameters as you want (they get discarded) and you can also omit as many parameters as you want (it's like passing undefined).
The array-like `arguments` object will always reflect what was actually passed to the function though.