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.
Got it. Thanks.
Hi ! Thanks for your feedback :) s.chomp did 2 things : specifying the return value as being s (last line of the method) and in the meantime removing the last character '\n' from s. If you don't specify any return value (that's what happened when you removed s.chomp), it returns the range used in your for loop.
Replacing s.chomp by s would have made the tests fail as the final string shouldn't have a '\n' at the end.
nicely, done. can you explain why the s.chomp is crucial here? Without it "1..n" is returned. how does removing the record separator from the end of the string make such a difference? thanks.