Ad
  • Custom User Avatar

    squareSum([], [1,2,2]) returns 0 which is fundamentally WRONG!
    It should be 9! even after you initialize the default value of reduce to 0 or []
    The issue lies within Javascript limitations.

  • Custom User Avatar

    add 0 or [] to reduce, (sum, 0) for example. this Excercise is fundamentally wrong because it returns purposefully zero when given and empty array so, don't be upset about this challenge.

  • Custom User Avatar

    None of these functions solve the problem; for example
    squareSum([],[1,2,2]) returns zero, which is WRONG!
    it should return 9 and not 0!!!!