Which statement about hoisting is correct?
- A var declarations are hoisted and initialised to undefined; let and const are hoisted but uninitialised
- B Nothing is hoisted in modern JavaScript
- C Only function expressions are hoisted
- D let is initialised to null when hoisted
Answer
var declarations are hoisted and initialised to undefined; let and const are hoisted but uninitialised
This difference is why reading a var before its declaration gives undefined while reading a let throws a ReferenceError.





