You shouldn't be flashing any JavaScript (at least not that I am aware off) ... rather you should be attaching the Web IDE and entering JavaScript there.
There is a quite active live chat on Espruino (and Espruino on ESP8266) here https://gitter.im/espruino/Espruino where there may be folks who can assist live.
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.
Howdy ... have a look at this video and see if it matches close to what you tried ... see:
https://www.youtube.com/watch?v=aJj4WJzAo4w
You shouldn't be flashing any JavaScript (at least not that I am aware off) ... rather you should be attaching the Web IDE and entering JavaScript there.
There is a quite active live chat on Espruino (and Espruino on ESP8266) here https://gitter.im/espruino/Espruino where there may be folks who can assist live.