• Whatever. For one, foo is not an build-in function so the reference to this part of the specs is not substantial. The linked codeburst.io article states "arguments.length indicates the exact number of arguments which does not depend on the number of parameters in the function definition.".

    Maybe your understanding of the spec is correct. But all other JavaScript implementations have a different understanding. Being the only to follow the spec is a bug - from the user point of view. Because it's incompatible with the rest of the world.

  • 'Whatever. For one, foo is not an build-in function so the reference to this part'

    Yes, exactly. So why would a coder define a function with a specific number of parameters expecting an exact return response, then expect Javascript or any language that supports methods and functions, to magically to produce the same desired result when that same coder is only passing one valid argument?

About

Avatar for Robin @Robin started