Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Nevermind. I resolved it. The issue was with my checking, not my return.
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?
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.
This comment is hidden because it contains spoiler information about the solution
This kata is much simpler in JS than it is in c#.
Adding more sophisticated tests would also force a change in requirements. Even then, the change adds maybe 3 lines to the required code.