function max(arr) {
    var maxNum = -Infinity;
    arr.forEach(function (item, index, array) {
        item > maxNum ? maxNum = item : maxNum = maxNum;
    });
    return maxNum === -Infinity ? undefined : maxNum;
}
/* max()
 *
 * Write a function max() that accepts an array of numbers and returns
 * the maximum number in the array
 */
max()
Write a function max() that accepts an array of numbers and returns
the maximum number in the array
max () Write a function max () that accepts an array of numbers and returns the maximum number in the array
function max(arr) {
    var maxNum = -Infinity;
    arr.forEach(function (item, index, array) {
        item > maxNum ? maxNum = item : maxNum = maxNum;
    });
    return maxNum === -Infinity ? undefined : maxNum;
}
function max ( arr ) { var maxNum = - Infinity ; arr . forEach ( function ( item , index , array ) { item > maxNum ? maxNum = item : maxNum = maxNum ; } ) ; return maxNum === - Infinity ? undefined : maxNum ; }
max()
 Write a function max() that accepts an array of numbers and returns
 the maximum number in the array
max () Write a function max () that accepts an array of numbers and returns the maximum number in the array