JS Built-ins
globalThisbeginner

typeof globalThis

πŸ“– Usage Example
globalThis.setTimeout === setTimeout  // β†’ true

globalThis provides a consistent reference to the global object across environments.

Verify that globalThis is always an object, regardless of the execution environment.

πŸ’‘ Hints (1)
  • β€’ globalThis always refers to the global object