- Shortest Program in JS: Empty file. Still, browsers make global Execution context and global space along with Window object.
- Global scope: Anything that is not in a function, is in the global space.
- Variables present in a global space can be accessed by a “window” object. (like window.a)
- In global scope, (this === window) object. For example refer the below,
var a = 10;
Console.log(windows.a) // 10
Console.log(a) // 10
Console.log(this.a) // 10
Use the share button below if you liked it.
It makes me smile, when I see it.