can anyone tell me how this is illegal shadowing in JS?
let a = 10;
{
var a = 20;
}
What I know is var 'a' will be created at global space and let 'a' is created at script space. Both are different memory location so why above shadowing is not possible