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 also got best practice votes so I interpret it as "a good combination of being maintainable and efficient but not something you would expect to see in production code."
check here please: https://docs.codewars.com/getting-started/solutions/#clever
Clever doesn't necessarily mean best practices. I once saw a solution that was worded in the longest way possible (like, absurdly long) and it got clever because most people got a laugh out of it, lol.
Check Discord Fixing channel.
While this behaviour is indeed an artifact of the testing system, it is also so easily accidentally stumbled upon that I would still consider the kata to be broken. It is also very easily fixed by moving the describe and it block from preloaded to the the sample and full tests. ( Fork here which fixes it )
Not a kata issue. Closing.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Specify the language where it is broken.
is there really any reason to do it this way besides it being a cool one-liner? is it more efficient than a normal loop?
I would rather give you an advice: try to solve as many basic katas as you can (8 / 7 kyu), and try to analyze the submitted solutions to understand how they work and to reproduce it yourself. You will learn a lot doing this, and more efficiently that with a theoretical explanation. You can do it with this one: copy the code, try to do some changes and see what happens.
Could someone please explain how this line works step by step? I am confused
Nice work checking the issues, kata curation is sparce on CW.
Nothing about this qualifies as best practice :/ I hope whoever voted it so clicked Best Practices instead of Clever by mistake.
Yes, that was pretty useless.
Fixed.
Loading more items...