Calculate the mean, mean and mode in a node.js file