Answers for "javascript highest element array"

10

javascript get array min and max

//get min/max value of arrays
function getArrayMax(array){
   return Math.max.apply(null, array);
}
function getArrayMin(array){
   return Math.min.apply(null, array);
}
var ages=[11, 54, 32, 92];
var maxAge=getArrayMax(ages); //92
var minAge=getArrayMin(ages); //11
Posted by: Guest on July-31-2019
6

jsx return greatest number between two numbers

Math.max(5, 10);
Posted by: Guest on April-21-2020
1

how to find max number in array javascript

const array1 = [1, 3, 2];
console.log(Math.max(...array1));
Posted by: Guest on June-22-2020
0

javascript index of biggest number

arr.indexOf(Math.max(...arr))
Posted by: Guest on December-20-2019

Code answers related to "javascript highest element array"

Code answers related to "Javascript"

Browse Popular Code Answers by Language