Hmm... sure you defined C with var? Try this:
var
(function() { var C = { foo : 42 }; exports.hello = function() { return C.foo+1; } })()
Just done and it compiles to:
(function(){exports.hello=function(){retÂurn 43}})();
@Gordon started
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.
Hmm... sure you defined C with
var
? Try this:Just done and it compiles to: