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

Heroku

Built for developers, by developers.

Whether you're building a simple prototype or a business-critical product, Heroku's fully-managed platform gives you the simplest path to delivering apps quickly — using the tools and languages you already love!

Learn More

Top comments (0)

ACI image

ACI.dev: Fully Open-source AI Agent Tool-Use Infra (Composio Alternative)

100% open-source tool-use platform (backend, dev portal, integration library, SDK/MCP) that connects your AI agents to 600+ tools with multi-tenant auth, granular permissions, and access through direct function calling or a unified MCP server.

Check out our GitHub!