Answers for "get highest and lowest value from array js"

7

js find lowest number in array

const arr = [14, 58, 20, 77, 66, 82, 42, 67, 42, 4]
const min = arr.reduce((a, b) => Math.min(a, b))
console.log(min)
Posted by: Guest on April-18-2021
17

get largest number in array javascript

const array1 = [1, 3, 2];

Math.max(...array1);
// expected output: 3
Posted by: Guest on August-07-2020

Code answers related to "get highest and lowest value from array js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language