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

Are function expressions hoisted like function declarations?

Short interview answer

The variable declaration follows its own rules, but assignment of the function expression occurs during evaluation. A var-bound expression is therefore undefined before the assignment.

Key takeaway

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

← Back to Scope and hoisting

Related questions