Just another thought though: What if there's no error but you still want to break out?
setInterval(function() { print('Oh No!'); }, 0);
Maybe the correct logic is just:
executeInterval(); if (Ctrl-C pressed less than 0.1 sec ago) { removeInterval(); }
@Gordon 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.
Just another thought though: What if there's no error but you still want to break out?
Maybe the correct logic is just: