Personally, to get a 5v signal for the output I'd just use a transistor: Rather than trying to produce a 5v signal, it's easier to use the transistor to 'pull' a signal down to 0v, and just to connect the other side of the speaker to 5v (or an even higher voltage).
You can also use the ULN2003 and solder it on the board (it's just a chip with several different channels and the resistors built-in), or even the L293D which allows you to pull both high and low.
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.
That's great!
Personally, to get a 5v signal for the output I'd just use a transistor: Rather than trying to produce a 5v signal, it's easier to use the transistor to 'pull' a signal down to 0v, and just to connect the other side of the speaker to 5v (or an even higher voltage).
There will be a bunch of stuff on it online - it looks like there's a good tutorial (for Arduino) here: http://www.instructables.com/id/Use-Arduino-with-TIP120-transistor-to-control-moto/
You can also use the ULN2003 and solder it on the board (it's just a chip with several different channels and the resistors built-in), or even the L293D which allows you to pull both high and low.