Answers for "get max value of array with not only numbers js"

1

js get max value in an array

const myArray = [1, 14, 32, 7];

const maxValue = Math.max(...myArray);

console.log(maxValue); // 32
Posted by: Guest on February-01-2022
4

find max and min value in array javascript

var numbers = [1, 2, 3, 4];
Math.max(...numbers) // 4
Math.min(...numbers) // 1
Posted by: Guest on May-27-2020

Code answers related to "get max value of array with not only numbers js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language