No, but if you use match in your code, it can return null.
Is there any strange case value in random tests, like undefined, numbers, nulls etc? I got "TypeError: Cannot read property '1' of null" but in my console I reach the expected result for many values that I test
This comment is hidden because it contains spoiler information about the solution
haha, same thought process but seeing your solution I notice how I wrote so much unnecessary code. OMG!! I'm always over comlicating things ✌_(ツ)_/¯
Very nice kata, thanks =)
Great kata! Odd title? The best solutions seem to not use subqueries.
Wow, it's totallu 8kyu. It's basic array method.
Replaced tests with chai / mocha and descriptive messages.
No random tests
@javatlacati Are you sure about that? do you assume that every single person in the world has the exact opinion like you have? Oh and, we're working with programming here, or precisely, computer. Does computer know about perception? Do they know about clarity, readability, and trivial things? No, they expect exact, strict, and definite syntaxes. They just do what they're programmed to do.