#Error expected 0.75 to equal 1
5 messages · Page 1 of 1 (latest)
What is your question?
^
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?
If you expect integers as result, you need to code that like return Math.round(sum / (i + 1))
It's an average, I don't think they're after an integer.