The Puck.light() command is measuring the voltage across the red LED (pin D5) since LEDs actually generate a small voltage from light (as well as creating it). So you don't need an LDR for it to work.
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.
Sorry for the delay...
The
Puck.light()
command is measuring the voltage across the red LED (pin D5) since LEDs actually generate a small voltage from light (as well as creating it). So you don't need an LDR for it to work.