Holen Sie sich die größte Nummer in Array JavaScript
const array1 = [1, 3, 2];
Math.max(...array1);
// expected output: 3
Jerky
const array1 = [1, 3, 2];
Math.max(...array1);
// expected output: 3
let numArray = [95, 1, 75, 7, 12, 50, 3, 88]
numArray.slice().sort(function(a, b) {
return a - b
})
console.log('smallest: ' + numArray[0] + ', largest: ' + numArray[numArray.length - 1])