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.
name is a String object.
String class has the [] instance method that let you
extract parts of the String object.
In this case name[0] returnes the first character of name
name[1..-1] will give back a new string without the first character
https://ruby-doc.org/core-2.7.2/String.html#method-i-5B-5D
You misunderstood the task. You need to find the outlier, which can be odd OR even. You should read the description again.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Read this: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution#post-discourse
Not the shortest word.
This comment is hidden because it contains spoiler information about the solution
It fails for [].
This comment is hidden because it contains spoiler information about the solution
Why name with an array and 0 ? name[0]
Yes, that's what the comment in the initial code says
Not a suggestion, rather a question. RETURN the result (as the name implies), not print it (this applies to all katas).
This comment is hidden because it contains spoiler information about the solution