Why are class declarations not hoisted in javascript while function and variable declarations are? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Why are class declarations not hoisted in javascript while function and variable declarations are?

Wouldn't it have been convenient to add this feature for classes too to be consistent?

3rd Sep 2019, 11:06 PM
Sonic
Sonic - avatar
1 Answer
4th Sep 2019, 6:31 AM
Aaron Eberhardt
Aaron Eberhardt - avatar