```
   <script>
    function range (start , end ) {
      var list =[]
      for (var count = start ; count <= end ; count++)
        list.push(count);
      return list
    }

    function sum ( nums ) {
      var total = 0;
      for ( var count = 0 ; count <= nums.length ; count++ )
        total = total + nums[count];
      return total;
    }

    console.log(range(1 , 10))
    console.log(sum(range(1 ,10)))
    </script>

```

When I run this, the output from my `sum` function will be `NaN`. I know the solution is to remove the `=` from the `sum` function however I do not understand how this solves the problem.