Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.1
-
None
Description
The following script
var x = function(a) { var b; return b}; x(1,2)
returns 2. The expected behaviour is to return null.
As an additional safeguarding measure we may also consider restricting a function call with more supplied arguments than the number of declared parameters, since, IMO, in a majority of cases this is a bug, like where the function definition was changed but the call was not updated accordingly.