let x = 0; { { let x = 10; } x += 10; } console.log(x); This will print 20 although the correct value should be 10.
let x = 0;
{
{ let x = 10; }
x += 10;
}
console.log(x);
This will print 20 although the correct value should be 10.