Well, can you try to call analogRead(A0) with the sensor unplugged? The pin should pick-up random values and you'll be able to see them change in the console
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.