Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Min JavaScript Methods

function myArrayMin(arr) {
  let len = arr.length;
  let min = Infinity;
  while (len--) {
    if (arr[len] < min) {
      min = arr[len];
    }
  }
  return min;
}
 
PREVIOUS NEXT
Tagged: #Min #JavaScript #Methods
ADD COMMENT
Topic
Name
5+4 =