Question 4 of 10Pro Only
What is hoisting in JavaScript? How does it affect var, let, const, and function declarations?
Sample answer preview
## What is Hoisting? Hoisting is JavaScript's behavior of moving declarations to the top of their scope during the compilation phase, before code execution. ## How Different Declarations Are Hoisted ### var - Hoisted and initialized as undefined ```javascript console.log(x); //…
hoistingtemporal dead zoneTDZvariable declarationscope