Duplicate Parameters
suggest changeA non-strict classic script allows the same parameter name twice. The binding receives the last matching argument. A "use strict" directive that is not the first statement of the script does not turn the next function into strict code.
Duplicate names are a SyntaxError in modules, in strict code, and in any function whose body starts with "use strict":
function loose(bar, bar) {
return bar; // the last argument
}
function strict(bar, bar) { // SyntaxError
"use strict";
}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents