redeclaring with `var` is okay
This should work...
function foo () {
var x = 1;
var x = 2;
}
Only if one or more of the declarations is a let
or a const
should it throw an error
This should work...
function foo () {
var x = 1;
var x = 2;
}
Only if one or more of the declarations is a let
or a const
should it throw an error