Why does block A result in a ReferenceError?
const something = 'something';
console.log ();
try {
// Block A
{
const something = something;
}
} catch (e) { console.log(e); }
console.log ();
// Block B
{
const something = 'somethingElse';
}
This prevents one from shadowing a variable with one of its properties.