var numbers = [5, 6, 2, 3, 7, 1.6, 6.9, 7.01];
var max = Math.max.apply(null, numbers);
var min = Math.min.apply(null, numbers);
console.log(max); // 7.01
console.log(min); // 1.6
var arr = [1, 2, 3, 4, 5, 5, 4.9, 4.95, 5.01, 0.98]
var maxArr = Math.max(...arr)
var minArr = Math.min(...arr)
console.log(maxArr);
console.log(minArr);