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.
I believe it is to do with the readibility. It's almost English !!!
I think this code is clever because it is the type of code that is not typically on people's radar when they're first learning to code in Ruby on Rails. I know this because I'm a total newbie at this and the first lessons you learn with Ruby are if/elsif/else statements. Using these if/elsif/else statements is therefore the thing that many newbies will be most inclined to use for an assignment like this. This "when" command followed by a range is not something taught very often in your first classes with Ruby and it is the type of free-and-easy code that belies extensive experience with the language. So my thinking goes.
I agree, definitely need more test cases. My commit solved all the tests in the test cases, also the example you provided:
[9,1,10,80]
When I submit I passed all tests except one where it expects to return true. I am scratching my head trying to figure out what cases when true have I missed. Any suggestions on what to do to expand the test cases?
I can't tell you why :( It's just a basic Ruby specific feature, not "Obscure" or "Creative" xD !!
Please tell me why this is marked "clever".
This Kata is perfect, but there aren't enough final tests case.
My first code commit was wrong, I think, the test arrays always start with more than 9... so if a code only work with 10 in first index, this code can pass, like mine.
I began to test >= 10 with the first index (in a while), so if array start like that [9,1,10,80], my code returned false but pass in the test cases.