Znajdź wartość min w tablicy JavaScript
// find mimimum value of array in javascript
// array reduce method
const arr = [49,2,71,5,38,96];
const min = arr.reduce((a, b) => Math.min(a, b));
console.log(min); // 2
// math.min apply method
const min_ = Math.min.apply(null, arr);
console.log(min_); // 2
// or math.min spread operator method
const min__ = Math.min(...arr);
console.log(min__); // 2
Chetan Nada