copied and pasted the code from the emulator window into the Web IDE and downloaded it to RAM
-> The puzzle is displayed on my Bangle2 without any errors or warnings.
This confirms the statement from HughB that the code is correct but the environment needs to be fixed.
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.
Your "Garbled 15 puzzle (v0.02)" is working on my "real" Bangle.js 2 :
https://www.espruino.com/ide/?codeurl=https://dirkhillbrecht.github.io/BangleApps/apps/p15prob/puzzle15.app.js&upload&emulator
-> The puzzle is displayed on my Bangle2 without any errors or warnings.
This confirms the statement from HughB that the code is correct but the environment needs to be fixed.