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.
image

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
image

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
image

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

Sentry blog image

How I fixed 20 seconds of lag for every user in just 20 minutes.

Our AI agent was running 10-20 seconds slower than it should, impacting both our own developers and our early adopters. See how I used Sentry Profiling to fix it in record time.

Read more

Top comments (0)

SurveyJS custom survey software

JavaScript UI Libraries for Surveys and Forms

SurveyJS lets you build a JSON-based form management system that integrates with any backend, giving you full control over your data and no user limits. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay