Web/Javascript
[Javascript] 배열에서 최댓값/최솟값 구하기
동띵
2022. 5. 23. 13:43
const numbers = [6, 3, 7, 9, 8];
const max = Math.max.apply(null, numbers);
const min = Math.min.apply(null, numbers);
console.log(max, min)
=> 9 3