Question 14
Back to Exercise
What is the value of save on the first line of a scope that later contains var save = function () {};?
- A The function
- B null
- C undefined Correct
- D It throws a ReferenceError
Correct Answer: Option C
Only the var declaration is hoisted. Calling save() early is therefore a TypeError (save is not a function).
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!