Beginner
JavaScript
Q9 / 100
What is hoisting in JavaScript?
Correct! Well done.
Incorrect.
The correct answer is B) Declarations being moved to the top of their scope by the JavaScript engine before execution
B
Correct Answer
Declarations being moved to the top of their scope by the JavaScript engine before execution
Explanation
var declarations and function declarations are hoisted. var is initialized to undefined; function declarations are fully hoisted. let/const are hoisted but not initialized (TDZ).
Progress
9/100