If you want to reference different intervals at the same time, that can be pretty easy as well:
var ia = setInterval(...);
var ib = setInterval(...);
var ic = setInterval(...);
// some time later...
clearInterval(ia);
// and later..
clearInterval(ib);
// etc...
I only suggest the closures because it looked like you wanted to start several copies of the same interval, which would stop themselves
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.
If you want to reference different intervals at the same time, that can be pretty easy as well:
I only suggest the closures because it looked like you wanted to start several copies of the same interval, which would stop themselves