globalThis
The global globalThis
property contains the global this
value, which is usually akin to the global object.
Value
The global this
object.
Note: The
globalThis
property is configurable and writable so that code authors can hide it when executing untrusted code and prevent exposing the global object.
Description
The globalThis
property provides a standard way of accessing the global this
value (and hence the global object itself) across environments.