While not tested, it appears to be a Javascript rules violation, L6 function defined within a separate defined function.
EDIT Thr 2021.04.01
While unsuccessful at finding a specification reference, my comment above is true while in strict mode, and it is strongly suggested Not to create an inner function declaration.
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.
Thr 2021.03.25
While not tested, it appears to be a Javascript rules violation, L6 function defined within a separate defined function.