I meant calling something like if (clock.turnOffServiceTimeout) clearTimeout(clock.turnOffServiceTimeout);
to remove the timeout handler. Deleting the variable only removes the timeout id from memory until it is set again in the next line.
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 meant calling something like
if (clock.turnOffServiceTimeout) clearTimeout(clock.turnOffServiceTimeout);
to remove the timeout handler. Deleting the variable only removes the timeout id from memory until it is set again in the next line.