Function declarations not hoisted? #1219
Replies: 5 comments
-
Posted at 2018-10-10 by @gfwilliams Yes, unfortunately Espruino doesn't do Function Hoisting. Due to the way Espruino executes code it parses as |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-10-10 by Georg Oh, ok, thanks! Is that said somewhere in the docs? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-10-10 by Georg One more question please :-) I don't understand why does the red led stay on with the script above, until I press the BTN or the first timeout times out? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-10-10 by @gfwilliams Actually it looks like it wasn't (I think it's been mentioned in github/forum a bit) but as we now have http://www.espruino.com/Features I've added a specific mention of it (it'll go live in a few days). |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-10-10 by Georg Thanks, again, Mr. Williams! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-10-10 by Georg
This:
??
Beta Was this translation helpful? Give feedback.
All reactions