The find_max() function looks for the largest number in a set of numbers. If the number is larger than the maximum number the function finds, then that number is used.
function find_max(nums) {
let max_num = Number.NEGATIVE_INFINITY;
for (let num of nums) {
if (num > max_num) {
}
}
return max_num;
}