When i call addCached inside a switch statement like this:
var totest='exp';
switch(totest) {
case 'exp':
Modules.addCached('SM','');
break;
case 'nxt':
break;
}
Uncaught SyntaxError: BREAK statement outside of SWITCH, FOR or WHILE loop
at line 1 col 52
...Modules.addCached('SM','');break;case'nxt':break;}
^
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.
Hi Gordon
this works:
When i call addCached inside a switch statement like this: