Ad
  • Custom User Avatar

    Nevermind. I resolved it. The issue was with my checking, not my return.

  • Custom User Avatar

    Hey guys, I'm passing every test case except for the first in javascript.

    I can't seem to get an empty array to return.

    Using 'return [];' is giving back '[undefinded]' instead of '[]'.

    Can anyone point me in the right direction for how to just return the empty array?

  • Custom User Avatar

    You can actually still improve this further if you'd like. You're iterating more times than you need to, and therefore checking too many numbers.

  • Custom User Avatar

    only need two line code

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    It's in both languages really simple...;-)

  • Custom User Avatar

    This kata is much simpler in JS than it is in c#.

  • Custom User Avatar

    Adding more sophisticated tests would also force a change in requirements. Even then, the change adds maybe 3 lines to the required code.