Answers for "which one is correct to find max of elements in an array. note arr: name of array of size 3. in html"

1

get max number in array

console.log(arrayNumbers.sort((a, b) => a - b ));
Posted by: Guest on November-06-2021
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

Code answers related to "which one is correct to find max of elements in an array. note arr: name of array of size 3. in html"

Code answers related to "Javascript"

Browse Popular Code Answers by Language