Added mean, median, mode

This style of if statement, while popular in C, is considered an anti pattern in javascript.