Javascript Array sort() get highest value
sort()
var points = [40, 10, 1, 5, 25, 10]; console.log(points);/*from www . ja v a 2s. c om*/ points.sort(function(a, b){return b-a}); console.log(points[0]);