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
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
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

Rijwan AnsariPosted Oct 18, 2021, 10:31 AM
Sachin SinghPosted Oct 17, 2021, 5:17 PM