• In node.js, each module has its own top-level scope, but they all have access to the global object. Although, the use of global variables is frowned upon (bad for testability and various other reasons) :)

    http://nodejs.org/api/globals.html#globals_global

    I think the same would make sense for Espruino, each module having its own scope and the ability to access the global global object for shared state.

About

Avatar for Joakim @Joakim started