text: // returns the average value of an array of numbers
  function avg(array) {
    function sum() {
      let total = 0;
      for (let i = 0; i < array.length; i++) {
        total += array[i];
      }
      return total;
    }
    let newTotal = sum();
    return newTotal / array.length;
  }
  
  module.exports = avg;
  