Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript lowest number

function lowestNumber(numbers) {
  // typeof numbers parameter is array
  let lowest = numbers[0];
  for(let i = 1; i < numbers.length; i++){
    if(numbers[i] < lowest){
      lowest = numbers[i]
    }
  }
  return lowest;
}
 
PREVIOUS NEXT
Tagged: #javascript #lowest #number
ADD COMMENT
Topic
Name
5+1 =