🚧 under construction
Last updated 2 years ago
Was this helpful?
JS ⟩ variable ⟩ redeclaration
🚧 (redeclaration)
(redeclaration ) JS is lenient with var, strict with let.
var redeclaration applied even in strict mode❗️, even in strict mode
let redeclaration not allowed even in sloppy mode❗️, even in sloppy mode
var redeclaration
var redeclaration applied even in strict mode❗️ (even in strict mode)
var can shadow parameter even in strict mode❗️ - parameters can be shadowed by "var"
let redeclaration
let redeclaration not allowed even in sloppy mode❗️ (even in sloppy mode)
var can shadow parameter even in strict mode❗️ - parameters can't be shadowed by "let"
variable declaration
function redeclaration
variable shadowing