I should point out that version 1v51 (in development) has debounce, so I wouldn't worry too much about this unless you want to do it for fun :)
You can get the development build from http://www.espruino.com/binaries/git for the Espruino board or https://espruino-nightly.noda.se/ for others.
@Gordon started
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.
I should point out that version 1v51 (in development) has debounce, so I wouldn't worry too much about this unless you want to do it for fun :)
You can get the development build from http://www.espruino.com/binaries/git for the Espruino board or https://espruino-nightly.noda.se/ for others.