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 comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
The description does not say what the output should be
Yes, if a sperm really has XX or XY, you're likely going to get a miscarriage. Best case, Kleinfelter or Triple X syndrome.
This isn't a biology website, but I'd suggest changing the parameter in the starter code to 'chromosomes' or 'zygote'. A mature, healthy mamallian sperm cell is haploid. It only contains either ONE 'X' or ONE 'Y'. A sperm cell with an 'XY' is the product of, e.g., nondisjunction, and at best will result in a child with a disorder of sexual development, but more likely a miscarriage.
regex is useful if you know it. just takes some practice.
how is this unreadable? It makes it so much clearer than, e.g., the kata description.
You need to describe the odd behavior you're expecting in edge cases
This comment is hidden because it contains spoiler information about the solution
The argument isn't being assigned to a function. The function name required by the kata (stringToNumber) is being assigned to an existing function. This is similar:
var rand = Math.random
now you have a function, rand, that can do the same thing Math.random can.