Jacqueline Aluoch

Jacqueline Aluoch

  • NA
  • 8
  • 48.3k

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)