Question 4
Back to Exercise
Which declaration is hoisted together with its value, so it can be fully used before its line?
- A var calc = 1;
- B let calc = 1;
- C function calc() {} Correct
- D class Calc {}
Correct Answer: Option C
Function declarations are created in full during the creation phase. var is hoisted as undefined; let and class are hoisted but uninitialised.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!