DEV Community

Cover image for Summarizing Namaste 🙏 JavaScript EP05 (Window object )
Abhinav Singh Jamwal
Abhinav Singh Jamwal

Posted on

Summarizing Namaste 🙏 JavaScript EP05 (Window object )

Thank you Akshay Saini for this beautiful series. Just summarizing your lessons for whenever I need a quick recap. Same for others. Hope it helps.

What is window object ?

window is a global object which is created alongside with Global execution context.
So, even if you don't write any code , Js automatically provides us with a global object named window which contains many methods.

What is global space ?

Any code which is not written inside a function lies in global space.

At global level, this === window
We will talk about this in upcoming blogs

If you look at the right side, var a is tied to the global object that is window object. Hence, its memory is allocated in window object

If you don't put anything before a, Js assumes that it is in global space.

Discussion (0)