3 ms·
Passing the "wrong" number of arguments isn't a syntax error in JavaScript. If you pass fewer arguments than declared parameters, the rest are implicitly undef
by gnfurlong 8y ago
Passing the "wrong" number of arguments isn't a syntax error in JavaScript.
If you pass fewer arguments than declared parameters, the rest are implicitly undefined. The variations you were seeing probably just came down to how the invoked function handled that undefined value. I can still understand how inconsistency in behavior there might be confusing.