Mean Median Mode in AngularJS