Javascript calculator - part of Node.js tutorial