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.
Description changed.
Already pointed out by JohanWiltink just below. Don't raise duplicate issues.
(FOR JS)
Everything in the solution counts as char limit, even the function name.
This code passes the tests.
This is literally the same code I came up with and kept failing due to not passing 50 char limit.
I had to forfeit eligibility just to to see this answer.
Went back in and it still fails.
Smh.
( JS )
This is incorrect. Everything in the solution counts against the limit, not just the function body.
I actually think this is a better test with less restrictive length. Under 50 characters just lends itself to more creative solutions IMO
It's not clear if the number is guaranteed to be an integer, certain solutions work only for integers:
https://www.codewars.com/kata/reviews/623ed1a05237e20001e922fc/groups/623f0e164b14a50001569909
https://www.codewars.com/kata/reviews/58a884ec60bde0d33b000b22/groups/58a890f74fdb685e1f0004ae