functions defined in scope before calling is not defined #6629
Unanswered
espruino-discuss3
asked this question in
General
Replies: 1 comment
-
Posted at 2022-03-21 by @gfwilliams Yes, I'm aware of that. It's a side-effect of the way Espruino executes code as it parses. Espruino does have the ability to work in a two-pass mode where this code would then work, but doing two passes really hurts execution speed so the decision was made not to turn the functionality on. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2022-03-19 by bmatusiak
most JS interpreters scan ahead for new function definitions within its current scope
Espruino's JS does not
Beta Was this translation helpful? Give feedback.
All reactions