Labels aren't implemented because the way Espruino interprets code, it would be very difficult and inefficient to make them work - plus honestly I can't remember the last time I saw a label and goto in real code. The last time someone asked me about this was maybe 8 years ago?
So specifically you're interested in break to a label?
Honestly, it's hard to suggest 'an alternative' without any example but there's almost certainly a way of re-writing code in such a way where you don't have to use them.
It's worth noting that if you were planning on using breaks as a performance enhancement, it may not work the way you expect on Espruino because it's interpreting (and executing as it parses).
© Espruino, powered by microcosm.
Report a problem