Skip to content
JavaScript·Intermediate·Conceptual·1 min read

What is the global execution context in a browser module?

Short interview answer

Module code executes with module semantics and its own environment; top-level this is undefined and declarations do not become global object properties.

Key takeaway

Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.

← Back to Execution context

Related questions