Basic car acceleration simulator in Node.js