Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

find the maximum no. in array js

function findMaxArrValue(numbers) {
  let max = 0;
  numbers.forEach((number) => {if (number > max) {max = number}});
  return max;
}

console.log(findMaxArrValue([23, 69, 55, 31, 75, 100, 82]));
//Output 100
Source by medium.com #
 
PREVIOUS NEXT
Tagged: #find #maximum #array #js
ADD COMMENT
Topic
Name
1+6 =