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.
Note that
String.match
returnsnull
if there are no matches, which explains the first line of the message: the random string generated for the test case presumably doesn't contain one of the nucleotides. Sincelength
is not defined fornull
objects, your variablecountX
remains undefined. Also note you are returning a string, whereas the description says you should be returning an object.Lol, nice hack, thanks for spotting this.
Thanks for the comment!
You're right, I've added a sentence to clarify your point just after item 3 in the description.
Just a minor comment on the wording, which is a bit unclear in places. For example, in the first section, I think it would be clearer to split the sentence over two lines like:
Sue has hidden her word away in an array which includes:
It might also be worth specifying what kinds of inputs the user needs to worry about (i.e. do they need to handle empty/invalid inputs, duplicates, or will all your test cases specify correct inputs)