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.
You have trailing spaces in your answer
Hey, you're already iterating over a full array. If you can do all your addition and multiplication in the same loop (inside if) you won't have to run reducers again. It will improve your performance atleast twice. :)
The tests don't pass even if I get correct output. Am I missing something?
Another one
Hey,
You don't need to split the string just to use
.indexOf
on it.i.toString().indexOf()
will work just as fine. :)So in your solution, inside for loop,
or
will do just fine.