javascript lowest number

Solutions on MaxInterview for javascript lowest number by the best coders in the world

showing results for - "javascript lowest number"
Paula
03 Oct 2020
1function lowestNumber(numbers) {
2  // typeof numbers parameter is array
3  let lowest = numbers[0];
4  for(let i = 1; i < numbers.length; i++){
5    if(numbers[i] < lowest){
6      lowest = numbers[i]
7    }
8  }
9  return lowest;
10}