Jacqueline Aluoch

Jacqueline Aluoch

  • 2.1k
  • 8
  • 418

help me fill the missing line

Oct 17 2021 2:32 PM

 function find_max(nums) {
 let max_num = Number.NEGATIVE_INFINITY; // smaller than all other numbers
 for (let num of nums) {
 if (num > max_num) {
 // (Fill in the missing line here)
 }
 }
 return max_num;
 }

 

help me fill the missing line 

 


Answers (3)