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.
SOLVED: Don't modify the 'functions' array. If you pop, push, shift or unshift, it won't work because the tester function also calls the same functions from the same array. The same thing doesn't happen with the first four sample tests because the expected outcomes are hardcoded instead of being evaluated at runtime.
What he said. Random tests appear to expect the input. I can simply return the input value unchanged and all the random tests are passed but then the first four sample tests are incorrect.
A couple of examples:
Log
function (s){return s.toUpperCase()}
function (s){return s[0].toUpperCase() + s.substring(1).toLowerCase()}
function (s){return s.split("")}
function (l){return l.join("-")}
function (s){return s[0].toUpperCase() + s.substring(1).toLowerCase()}
Random test 11 - Expected: '"lmxx9k"', instead got: '"L-m-x-x-9-k"'
Log
function (s){return s.toLowerCase()}
function (s){return s[0].toUpperCase() + s.substring(1).toLowerCase()}
function (s){return s.toUpperCase()}
function (s){return s.toUpperCase()}
function (s){return s[0].toUpperCase() + s.substring(1).toLowerCase()}
Random test 12 - Expected: '"wxb3wf"', instead got: '"Wxb3wf"'
You may try posting your code in a comment with a spoiler tag, so somebody may look at it. Before closing the issue I've completed the JS version, and verified that I'm applying all the functions correctly, and the intermediate values are changing, resulting in a value (possibly) different from the input.
But the question is: are you modifying the input or not?
JS tests are working perfectly fine. Make sure you're not modifying the input.