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.
Please do not post comments with code or solutions without the spoiler flag, otherwise anyone can see them.
I have added the flag to your comment.
This comment is hidden because it contains spoiler information about the solution
im guessing people just blindly click the upvotes just because its at the top
him: making the solution longer by adding turnary operator
||||
26 people: C L E V E R
Good point
Why add the trinary operator, opposed to just returning the expression in the parentheses?
Awesome!
Fixed.
This comment is hidden because it contains spoiler information about the solution
Pretty sure
null
has no length property. ;)The right error message you should be seeing is this:
This comment is hidden because it contains spoiler information about the solution
The expected solution is not clear.
Yes it works if the array is empty or null.
But [0,0] is neither empty or null. It has two elements 0 and 0.
So this needs to be fixed.
Why not? The sooner the better (and after all, writing sample tests for this kata is easy), but the sample tests were located in the real tests tab, so I moved them and added random tests there.
Ok see your point if it is a higher level kata.
But an 8kyu is expected to write their own test?
You have to write your own tests there, that's just a template.
Loading more items...