JavaScript·Intermediate·Conceptual·1 min read
What makes circular dependencies dangerous?
Short interview answer
ES modules can represent cycles, but code may access a binding before the exporting module has initialized it. Cycles also signal tangled ownership and make evaluation order harder to reason about. Move shared contracts to a lower-level module or invert the dependency.
Key takeaway
Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.