The button connects (if pressed) VCC (3.3V) to Ground producing a short.
If you want to pull a pin to ground you should always use a resistor e.g. 10k and not tie it directly,
see: https://en.wikipedia.org/wiki/Pull-up_resistor for details.
Note: The article describes pull-up, but the same principle applies to pull down.
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.
The button connects (if pressed) VCC (3.3V) to Ground producing a short.
If you want to pull a pin to ground you should always use a resistor e.g. 10k and not tie it directly,
see: https://en.wikipedia.org/wiki/Pull-up_resistor for details.
Note: The article describes pull-up, but the same principle applies to pull down.