+ 2

What languages besides Javascript have the concept of variable hoisting?

... where variable declarations are moved to the top of the current execution context?

30th Jul 2019, 11:09 PM
Sonic
Sonic - avatar
3 odpowiedzi
+ 2
Variable hoisting is actually a very bad idea. In bigger code bases it is easy to get a collision, which you probably don't want and adds massive complexity.
31st Jul 2019, 5:07 PM
Loeschzwerg
0
I don't know of any right now, there are function prototypes in c/c++ though. That sort of functions similarly.
31st Jul 2019, 4:20 AM
JS Coder