Ad
  • Custom User Avatar

    i guess it's to late but, in reduce, you have initial value after callback function, which is most of the times called accumulator. So if initial value is 0 and there is no elements in an array - it return 0, as callback never called.

  • Custom User Avatar

    No! The kata is correct check your code.