why do I get referenceError; can't access lexical declaration `foo' before initialization? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

why do I get referenceError; can't access lexical declaration `foo' before initialization?

I called a function before declaring it with arrow function and got the referenceError. but when I later changed arrow function and use function keyword it works.

7th Aug 2020, 8:53 AM
BodV6
BodV6 - avatar
1 Answer
0
It has a very easy description,but i could not tell you since my english is not good. You can check it in google, it problem of scoping idea!!!!
7th Aug 2020, 5:34 PM
george
george - avatar