input_pullup adds a resistor inside the chip, pulling the LDR pin towards 3v. If you keep that on when the LED is on then it's going to suck up lots of power - hence the reason for just setting to an input to turn it off
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.
pinMode info is here: http://www.espruino.com/Reference#l__global_pinMode
input_pullup
adds a resistor inside the chip, pulling the LDR pin towards 3v. If you keep that on when the LED is on then it's going to suck up lots of power - hence the reason for just setting to an input to turn it off