Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to find the lowest number in an array in javascript for specific indexes

var index = 0;
var value = temp[0];
for (var i = 1; i < temp.length; i++) {
  if (temp[i] < value) {
    value = temp[i];
    index = i;
  }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #find #lowest #number #array #javascript #specific #indexes
ADD COMMENT
Topic
Name
4+7 =