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.
same here man
That's not how
else if
s work. Once oneif
is satisfied, it breaks out of theelse if
chain. By your logic, 15 would actually be added thrice:15 % 3 == 0
and15 % 5 == 0
so that will trigger the first one, then the secondelse if
will trigger and so will the third.The test case implies there is an array being passed, yet you say that
number
is not an array.Edit: Also, you are simply
console.log(abc)
rather thanreturn abc
, might that be the issue?The same happened to me but I fixed it by removing some print statements. Just in case anyone else has this issue.
If it keeps happening you might have either allocated an array too big, or your code is too slow.