Are you ready for another code challenge? Join me in this video as you test your coding knowledge with the simple quiz questions.
Don't forget to make your guess in the comments below.
-------------------------------------------------------------------------------------------
🔔Like and subscribe for more videos. 🔔
------------------------------------------------------------------------------------------
Answer: OPTION C:- ReferenceError
Explanation:
When foo() is called, the variables x and y are not yet defined, so a ReferenceError is thrown.
This is because const and let declarations are not hoisted like var declarations, and are not accessible until they are declared.