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.
Sorry I'd not been on here for years :))
Ah, cheers! I'm not sure it's the most efficient one, but I think it's neat :p
Indeed. I think that wouldn't work either though, because then the apostrophe wouldn't be counted as a word character (but it should be, according to the description). Which is why I ended up with such a lon solution myself...
Likewise! :)
I think this will count a comma as one of the characters of the preceding word.
E.g. "To say, or not to say: that is the question" returns the wrong string ('say' is counted as a 4-character word).
I've added the anti-cheat code now :P Would you be happy to approve the kata? :)
Ok seems fine now - it was probably a codewars bug. Thanks for your help.
Hmm, I did that and now all the solutions appear invalid. However, if I submit my solution again I pass the tests. I don't get it :/
This comment is hidden because it contains spoiler information about the solution
I wouldn't call that an issue really, just an anti-cheat enhancement. I'll look into it.
Hi, have you been modifying the input (see below)?
Hi, in the description you ask to round to 2 decimal digits, but your test solution does not do any rounding?
Yes you're right, it wouldn't work for a general case.
This seems to get around it:
replace(/, (?!.*, ")/, ' and ')
Thanks :)
Is there a need for
toFixed(p)
here? Other than converting to a string...Welcome - yup much clearer now :)
Loading more items...