computeSum(integers)

Oh wait, I’m sorry. You have to add a return sum; line right after the for loop. Look at the post now; I’ve corrected it.

By the way, the advice given in that challenge doesn’t look good. (In fact, it’s bad advice.)
Is it from freeCodeCamp?

That is why a newbie like me is stuck in the middle, I need experts like you to help, nurture and mentor me out. Regards.

I’m no expert lol. I’m also learning how to code. Albeit a different language, and not from FCC.

Dan, any help from your side. Please.

Just don’t put in a number less than 0 in the array of numbers you use as input? It says don’t do it in the instructions, so just not doing it should avoid errors.

Edit: I have no idea how what looks like your homework problem (??) is set up, how it is being tested. But it says clearly in the instructions the number cannot be less than 0. So if you are getting an error when you run tests, and that error says Must be a number greater than 0, then that suggests there is a test present where there are numbers less than 0. Therefore that test is in complete violation of the instructions given for the exercise and is wrong?? Unless there’s still something wrong with your code and that isn’t actually the real error, or you have explicit instructions on how to handle errors, you can’t be expected to be able to pass this.

const computeSum = (arrayOfInts) => {
  result = 0;
  for (let index = 4; index < arrayOfInts.length; index += 5) {
    result += arrayOfInts[index]
  }
  return result;
};

or

computeSum = ints => ints.reduce((acc, int) => ((int % 5 === 0) ? int + acc : acc), 0)

Thanks for expert opinion and suggestion. I am still critically studying your inference. The result on submission is still in the negative.
Although, this is hard, it is making me to know new things.
Thanks Dan, you inspired me…