1//For Values
2var arr =[1,10,3]
3var min = Math.min.apply(null, arr),
4 max = Math.max.apply(null, arr);
5
6//For Objects
7var arr = [{a: 1},{a: 10},{a: 3}]
8var values = arr.map(val => val.a);
9var max = Math.max.apply(null, values);
10console.log(max)