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.
this method will count words that start with non-alphabetic characters (like "1st" or "_example") as neither positive nor negative.
If the string does not match regexp return null
null || [] returns [];
Nice solution!
I was just wondering – how exactly does the || [] work in this?
If the string does not match it gets put into an empty array right?
Is this array accessible or is basically like a dumping ground for letters that do not match?
you like me :))))))))))))))))))
I knew the whole time there would be a 2 liner regexp solution while typing my 20 lines of code...
This comment is hidden because it contains spoiler information about the solution
I have been able to complete this kata with erroneous code. From what i have seen it seems that there is missing test case, which counts for plus sign and then the number in any notation except decimal.