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.
This Kata was fun. But it had confusing wording regarding the "check" method in the instructions.
It me a while to figure out that check really meant tranffer money to from a user to another user.
Not, check the status. Another way of thinking of it is like "writing a check" to another user.
Maybe use give_money or transfer_money woudld be better names for this method.
I pass both of your mentioned cases with your solution. Clearly the issue lies within some part of your null or negation checker, but seeing your latest solution (which is correct), we may not know...
I am not sure why but, when i directly put an empty array, [], in the return section for if the array is empty or null, i get a wrong answer for it.
But, when i assign a variable with an empty array and then return said array for my empty or null array. It works.
Why is that?
Edit: I forgot to mention that this is JavaScript.
my code is basically me still hung over from c/c++.
I need to learn to use those fancy functions. :P
ignore the comment regarding s_num = str(num)
I mistakanely thought when debugging that it wasn't converting num to a string but in reality it was and my previous code was incorrect.
I was thinking the print output should have said "9119" instead of 9119 which made me think it was an int.
Hope this clears up any confusion.