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.
While my code could be improved (in times of performance), so could this Kata:
Fail: Execution Timed Out (12000 ms)
Test in codewars: 200ms;
Test in Vs Code: 109ms;
-.-
-- WARNING --
if you need it, use replace with a global flag instead of replaceAll!
Thanks, I somehow was able to pass the challenge!
That's not true, your code is wrong. Your final var will never be empty string if you initialize it as #.
This challenge has incorrect tests for JavaScript. In the instructions, it doesn't state that strings just with a hash(#) should return false.
I don't understand the following test:
Test.assertEquals(generateHashtag("a".repeat(139)), false, "Still an empty string")
If a is repeated x times, it's not an empty string.
What am I missing?