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.
They're are pseudo artifical constraints, such as "use a flat map", which don't necessarily make the end result easier to reason through, especially to more beginner programmers.
Additional test cases would be helpful, and maybe a note on the difference between privelged functions and prototypical functions.
There is no test code provided, and the desired output is a bit nebulous at first. Also, there should probably be a newline required after each entry, especially to encourage good UNIX/Linux habits.
I accidentally clicked submit before I could go back and do any refactoring or take out old debugging console.log lines. Anyway, this was my first time using JavaScript and I really enjoyed learning more about JS and Genetic Algorithms as well!
Nevermind, after working on it, I figured it out -- for future reference, calling "fitness("101010")" will return a numerical value (percent) match...you can also use console.log once your solution is syntactically correct, even before you ahve a solution figured out.
As far as I know, the population array is good (it returns an appropriate value when I console.log it in a test) but I don't know how to test the output of the fitness method itself... And I'm not even sure how to debug it when it's running in the "submit" mode that provides the fitness() function.
I keep stumbling when it comes to the fitness function -- I'm calling
but it's only returning null -- any advice?