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.
Your code fails for
blue
orBlUe
because you are checking the length first before the code logic flow enters theelse
statement, and obviously multiplying a string (l
) with an integer is invalid.Try adding the following line to the beginning of the function. Then you can determine what input is causing the error.