technical challenge: calculating operations to be executed in Node.js