Skip to content

Latest commit

 

History

History
2 lines (2 loc) · 319 Bytes

File metadata and controls

2 lines (2 loc) · 319 Bytes

Solution-for-this-javascript

Code sample JavaScript 1 function find_max(nums) { 2 let max_num = Number.NEGATIVE_INFINITY; // smaller than all other numbers 3 for (let num of nums) { 4 if (num > max_num) { 5 // (Fill in the missing line here) 6 } 7 } 8 return max_num; 9 } Can you answer this correctly? num = max_num