As of about 5 minutes ago it's called global, like in node.js.
But before that, there wasn't one. The best equivalent was just to add var global = this at the top of your code.
However, right now global isn't different for modules, so it will point to the same basic object even if you're in a module... Which I guess probably isn't that great.
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.
As of about 5 minutes ago it's called
global
, like in node.js.But before that, there wasn't one. The best equivalent was just to add
var global = this
at the top of your code.However, right now
global
isn't different for modules, so it will point to the same basic object even if you're in a module... Which I guess probably isn't that great.