3
Answers

help me fill the missing line

Photo of Jacqueline Aluoch

Jacqueline Aluoch

3y
48.1k
1

 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)