// Release 2
// Pseudocode

// Sum Function:
// define a sum function that takes in an array of integers.
// create a result variable equal to 0.
// iterate through the array and add each array value to the result variable.
// return the result variable.

// Mean Function: (you can copy paste the sum function, then just change what it returns)
// define a mean function that takes in an array of integers.
// create a result variable equal to 0.
// iterate through the array and add each array value to the result variable.
// return the result variable divided by the array's length.

// Median Function:
// define a median function that takes in an array of integers.
// create an if/else statement to check if the arrays length is even.
// inside that if statement, set the result equal to: the two middle values of the array, that have been added together and divided by 2.
// inside the else statement, set the result equal to: the middle value of the array.
// return the result variable.
// Release 3

function sum (array) {
  var sum = 0;
  for (var i =0 ; i < array.length; i++) {
    sum += array[i];
  }
  return sum;
}



function mean (array) {
  var result = 0;
  for (var i =0 ; i < array.length; i++) {
    result += array[i];
  }
  return result/array.length;
}



function median (array) {
  if (array.length%2 == 0){
    var median_index = array.length / 2;
    var median = (array[median_index - 1] + array[median_index]) / 2;
    return median;
  }
  else {
    var median_index = Math.floor(array.length / 2);
    var median = array[median_index];
    return median;
  }
}

Add code for release 3
Add code for release 3
