Previously, the Number function was applied around the mapped array, converting the entire array to a single number. To ensure only individual elements are converted to numbers, it is recommended to move the Number function inside the map function.
let arr = [
["2019","00","01", 9.99],
["2018","00","01", 9.32],
["2017","00","01", 6.88]
];
let max = Math.max(...arr.map((o) => { return Number(o[3]) })); //9.99
let min = Math.min(...arr.map((o) => { return Number(o[3]) }); //6.88
// Alternatively, this can be written as:
// Math.min(...arr.map((o) => Number(o[3])));
//
// https://www.w3schools.com/js/js_arrow_function.asp
console.log(max);
console.log(min);
Therefore,
before:
let min = Math.min(Number(...arr.map((o) => { return o[3] }))); //9.99
after
let min = Math.min(...arr.map((o) => { return Number(o[3]) })); //6.88