- Open Google Chrome's dev console.
- Enter
const a = "foo";
Unlike entering var b = "bar";
which will show as a property of window, viewable as window.b, there is no window property 'b'.
Const has block scope instead of function scope, but I'm curious why var would be attached to the window object while const would not.
I haven't been able to find any explanation for this behavior.