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.
'Looks like you've solved it'
Your global var keeps its value between tests, so it only works when calling your function once.
This comment is hidden because it contains spoiler information about the solution
ok
Read the following link and solve more katas before you author another kata: https://github.com/codewars/codewars.com/wiki/Tutorial%3A-Create-Your-First-Kata
Main Issues:
Hi guys, this is my first Kata that I have created. I hope it will be a good practice. I chose this particular example because I use it and its modifications a lot during my work.
Happy coding ^_^,
Daniel Pelnar
Very good solution