My code seems to work, but I’m getting an error message stating 'If any of the grades passed in are less than 0 or greater than 100, the function should return ‘You have entered an invalid grade.’
One idea would be to do the validation first, and not calculate the average until you know the inputs are valid. Be sure to return the message so you exit the function.
const avg = ...
if (avg < 60)
We don’t need interval testing if you go up in steps of 10.
Thank you! Turns out that the console.log statement within my function should have been a return statement. I changed that and it worked! Thanks for the feedback and idea.