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.
Swapped them, thanks for noticing this.
thank you for reporting, corrected them.
I realized my mistake, was returning String instead of Hash map. Sorry for bothering you.
for the Javascript version, I get all the regular tests running okay, i.e:
Test Passed: Value == {"":2,"r":2}
however when I try to submit, the same tests are failed, i.e:
Expected {"":2,"r":2} instead got "{"*":2,"r":2}"
Could it be something wrong with the way the output is evaluated?
yes, now it's all good: testing(PhoneDir.phone(dr, "1-908-512-2222"), "Phone => 1-908-512-2222, Name => Peter O'Brien, Address => High Street CC-47209");
It just probably took some time for all of the tests to update.
thank you! Now the main tests are treating this properly. However Your Test Cases part still expects "O Brien" so it might be confusing
testing(PhoneDir.phone(dr, "1-908-512-2222"), "Phone => 1-908-512-2222, Name => Peter O Brien, Address => High Street CC-47209");
I think there might be a small problem in the way the Java version of the kata handles ' symbol. For "Peter O'Brien" the expected name output is "Peter O Brien", but I guess given the way it's normally written, it would be better not to omit '.
When you go to your profile, you should be able to find it if you click "Unfinished" under "Kata:"
a hint for the newbies like myself - it helped me to use this resource: https://regex101.com/#javascript (for JavaScript) to test the regular expression I wanted to use