If you read the docs, he's not programming the microcontroller in JavaScript - just running a native shim on the microcontroller and then communicating via serial. So it's basically a node.js library to use an Arduino as a dumb I/O card for your PC, not to program the Arduino in JS.