I think this was a regression on 1v39 - it does work on the latest version in Git. You just need to hang on until I release a new one - or you can use an unofficial nightly build: https://espruino-nightly.noda.se/
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.
I think this was a regression on 1v39 - it does work on the latest version in Git. You just need to hang on until I release a new one - or you can use an unofficial nightly build: https://espruino-nightly.noda.se/