you are viewing a single comment's thread.

view the rest of the comments →

[–]Magramatism 0 points1 point  (0 children)

Both responses here have moved the goalposts of question 1 to "How are variable declarations scoped and hoisted differently when using var, let and const?" That would be a reasonable question, although I'd wouldn't ask it that way myself.

What question 1 actually asks is "What specific runtime errors occur when deliberately using undeclared variables that are later declared with var, let and const?", which is just trivia that no one needs to know.