Must be inside our own scope here so that, when we are unloaded, everything disappears.
Does anyone know what that means, exactly? In the previous version of the clock, that comment appeared, and the functions inside it were declared using the usual function foo() { syntax, which made the IDE complain. Now they're all defined like let foo = function() {, which makes the IDE stop complaining, but I don't understand the reason for the containing block.
I apologize if I missed this somewhere obvious in the documentation.
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.
In
apps/antonclk/app.js
, this comment appears:Does anyone know what that means, exactly? In the previous version of the clock, that comment appeared, and the functions inside it were declared using the usual
function foo() {
syntax, which made the IDE complain. Now they're all defined likelet foo = function() {
, which makes the IDE stop complaining, but I don't understand the reason for the containing block.I apologize if I missed this somewhere obvious in the documentation.