I was getting errors in some minified code (simple minification) and have identified the issue:
My function had two return statements - one within a loop, the other at the end of the function (sloppy , I know!!).
This caused the minifier to output a labelled break which isn't supported by Espruino.
Refactoring the function to have only one return statement solved the issue - hopefully this is of help to someone else.
(edit: Probably should have been posted this in the Javascript forum)
@DaveNI 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.
I was getting errors in some minified code (simple minification) and have identified the issue:
My function had two return statements - one within a loop, the other at the end of the function (sloppy , I know!!).
This caused the minifier to output a labelled break which isn't supported by Espruino.
Refactoring the function to have only one return statement solved the issue - hopefully this is of help to someone else.
(edit: Probably should have been posted this in the Javascript forum)