Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

globalThis

2 tags 1 category

The globalThis global property contains the global this value, which is usually akin to the global object.

Historically, accessing the global object has required different syntax in different JavaScript environments. On the web you can use window, self, or frames – but in Web Workers only self will work. In Node.js none of these work, and you must instead use global. The this keyword could be used inside functions running in non–strict mode, but this will be undefined in modules and inside functions running in strict mode. You can also use Function(‘return this’)(), but environments that disable eval(), like CSP in browsers, prevent use of Function in this way.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…