js min of array code example
Example 1: javascript min max array
Math.max(1, 2, 3)
Math.min(1, 2, 3)
var nums = [1, 2, 3]
Math.min(...nums)
Math.max(...nums)
Example 2: javascript minimum number in array
const min = arr => Math.min(...arr);
Example 3: js max value of array
let numbers = [4, 13, 27, 0, -5];
Math.max.apply(null, numbers);
Example 4: min array javascript
const nums = [1, 2, 3]
Math.min(...nums)
Math.max(...nums)
Example 5: javascript math min array
const nums = [1, 2, 3]Math.min(...nums)
Example 6: js return the highest and lowest number
console.log(Math.max(1, 3, 2));
console.log(Math.max(-1, -3, -2));
const array1 = [1, 3, 2];
console.log(Math.max(...array1));