JavaScript·Advanced·Conceptual·1 min read
Can await be used at module top level?
Short interview answer
ES modules can use top-level await in supporting environments, but it delays evaluation of dependent modules and can complicate startup waterfalls and cycles.
Key takeaway
Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.