function max(arr) {
  var m = -Infinity;

  for(var i=0; i< arr.length; i++)
    if(arr[i] > m) m = arr[i];
  return m;
}
// find the max value in the array, using a loop due to array size 
find the max value in the array, using a loop due to array size
find the max value in the array using a loop due to array size
function max(arr) {
  var m = -Infinity;
  for(var i=0; i< arr.length; i++)
    if(arr[i] > m) m = arr[i];
  return m;
}
function max ( arr ) { var m = - Infinity ; for ( var i = 0 ; i < arr . length ; i ++ ) if ( arr [ i ] > m ) m = arr [ i ] ; return m ; }
find the max value in the array, using a loop due to array size
find the max value in the array using a loop due to array size