Answers for "lowest value in array javascript"

3

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
10

javascript find smallest number in an array

const arr = [14, 58, 20, 77, 66, 82, 42, 67, 42, 4]
const min = Math.min(...arr)
console.log(min)
Posted by: Guest on February-16-2020
0

javascript get minimum value in array

// Getting min value
var arr = [5,1,9,5,7];
var min = Math.min(...arr);
console.log(min); // 1

// Getting max value
var arr = [5,1,9,5,7];
var min = Math.max(...arr);
console.log(min); // 9
Posted by: Guest on January-13-2021

Code answers related to "lowest value in array javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language