Tests should not print to stdout if not necessary. Instead of printing, inputs can be presented with test headers or custom assertion messages on failure.
Tests should be organized properly with describe and it blocks, and updated to the latest version of Node used by Codewars.
Suggested tests for edge cases: input with nothing but vowels, inputs with only vowels, sentences with only one word, empty string (if valid).
do you mean this part (0*) of the regex?, he/she is grouping here the part w/ zeros, I think it's clever, in a good sense, don't you think so?, or am I missing something?
This comment is hidden because it contains spoiler information about the solution
This is so confusing 😅, took a while before i understood what was going on
Normalize explaining your code with comments please. I have a hard time understanding this code.
describe
andit
blocks, and updated to the latest version of Node used by Codewars.this solution is kinda cool (:
It's still approvable. And I still don't like it enough to actually approve it.
clean
probaby not.
do you mean this part
(0*)
of the regex?, he/she is grouping here the part w/ zeros, I think it's clever, in a good sense, don't you think so?, or am I missing something?It's approvable. But is it ( still ) original?
Good solution!
Thanks!
match
is the full match of the regex, which in this case is ignored since we just want to use the two capture groups (p1 and p2).What does the 'match' in the function do?
I've now added some random test cases. Thanks for your feedback.
Loading more items...