JavaScript Duplicate Parameters


Example

Strict mode does not allow you to use duplicate function parameter names.

function foo(bar, bar) {}  // No error. bar is set to the final argument when called

"use strict";
function foo(bar, bar) {}; // SyntaxError: duplicate formal argument bar