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.
It's not clear whether all filenames will be in
"pickme-YYYYMMDD.fun"
format.The function name should be in camelCase.
No random tests.
Almost a duplicate of an older kata: https://www.codewars.com/kata/5286d92ec6b5a9045c000087
JSON specifically means the stringified notation. Just get rid of "JSON" from the description; it's confusing and I initially thought you wanted me to return the JSON string. What the function returns isn't JSON; it's an array containing a nested structure of objects and arrays.
I'd even go so far as to recommend changing the name of the function to leave out Json completely. Yes, it'll break everyone's solutions, but the Kata is still in beta and that's what it's for.
Is this ready to move out of beta now? What do I need to do - can someone vote it up or something? Thanks...
Thanks. I guess someone else needs to agree it - I can't.
Cool. I already marked it as ready.
I have done as you suggested. This has been good practise at defining requirements! If it's good to go now, can you mark it as such?
There's still no explanation. It's all well and good having examples of the output should look like, but if that's all there is, all the sorting and structure is still just implied. I know it's a drag, but you need to just write it out. It shouldn't have to be very long.
eg.:
The returned object should have the following structure:
A bit messy, but this would make everything really clear as to what is expected. Then, you do not have to include the whole test in the description; you could take it out completely if you wanted to!
Yeah, guess they couldn't live with lower-casing their initial letter ;-)
This is why I wasn't made CEO of Microsoft! ;)
You have changed the name of the function :)
I've written a much larger test now: maybe it's enough. I've also copied the test to the example fixture in order to both provide a clear description of what's required and save some work for everyone else.
Good catch on the JSON.stringify and thanks for the formatting tips: I'll have a think about the custom function to check it - maybe that should be a second Kata!
I seem to have broken everyone's solutions. I hope this isn't a fault in mine. I am a bit of a noob when it comes to Javascript and so find it hard to follow the incredibly concise solutions some of you have submitted but I will try and work out what's changed when I have time.
Loading more items...