The below works fine for me and I passed the test but on line 8 return Math.max(...val);
there’s a small yellow warning sign saying “‘spread/rest operator’ is only available in ES6 (use ‘eversion: 6’)”
What does that mean?
function largestOfFour(arr) {
// You can do this!
var max = arr.map(function(val){
return Math.max(...val);
});
return max;
}
largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);