Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Revisions

2 of 2
Commonmark migration

As per the spec

  1. If parameterNames has any duplicate entries, let hasDuplicates be true. Otherwise, let hasDuplicates be false.

21.b

NOTE Early errors ensure that duplicate parameter names can only occur in non-strict functions that do not have parameter default values or rest parameters.

So, your JS engine ensures that if one of the parameter has default values and hasDuplicates is true then it throws an error.

gurvinder372
  • 68.6k
  • 11
  • 78
  • 98

AltStyle によって変換されたページ (->オリジナル) /