| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/zh-TW/docs/Web/JavaScript/Reference/Errors/Redeclared_parameter | [Back] [Original] |
Get to know MDN better
SyntaxError: Identifier "x" has already been declared V8 SyntaxError: redeclaration of formal parameter "x"Firefox SyntaxError: Cannot declare a let variable twice: 'x'.Safari
SyntaxError
let JavaScript let
arg
function f(arg) {
let arg = "foo";
}
// SyntaxError: redeclaration of formal parameter "arg"
arg let
function f(arg) {
arg = "foo";
}
function g(arg) {
let bar = "foo";
}
This page was last modified on 2025721 by MDN contributors.
Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |