The functions aren't global, but in normal JS it's as if they were defined right at the top of the function. You can use them before they are defined.
Because Espruino doesn't precompile, that doesn't happen though :(
That is some freaky shit.
I did not know JS let you do that. Is there a reason for allowing such deviant syntax? That seems to break all sorts of normal conventions...
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
The functions aren't global, but in normal JS it's as if they were defined right at the top of the function. You can use them before they are defined.
Because Espruino doesn't precompile, that doesn't happen though :(