Ahh, yes, the issue is with the way Espruino doesn't handle let with scoping - and unhelpfully the minifier tends to overlap variable names whenever it can. It came up somewhere else recently, and using var is definitely the best bet.
As far as I know the Emulator has as much RAM as a real Bangle, so if you're hitting memory errors then it's probably a sign that your code just won't work on a real Bangle.
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.
Ahh, yes, the issue is with the way Espruino doesn't handle
let
with scoping - and unhelpfully the minifier tends to overlap variable names whenever it can. It came up somewhere else recently, and usingvar
is definitely the best bet.As far as I know the Emulator has as much RAM as a real Bangle, so if you're hitting memory errors then it's probably a sign that your code just won't work on a real Bangle.
It's rare that normal code has issues like this especially on Bangle.js 2. Have you seen http://www.espruino.com/Code+Style#other-suggestions
Are you doing something like trying to transpile code?