#Error expected 0.75 to equal 1

5 messages · Page 1 of 1 (latest)

honest hawk
#

All this code does is find the average.

function findAverage(array) 
{
  let sum = 0
  for (i = 0; i < array.length; i++) 
  {
    sum = sum + array[i]
  }
  return (sum / (i + 1));
}```
zealous spear
#

What is your question?

analog sandal
#

^
We can't tell you how or why you're getting the error in a test without knowing the output you have provided the function call.

What output does the test give when it expects and gets those results?

zealous spear
analog sandal