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.
Sometimes this happens no test are not bad! :)
I'm not sure if it's this kata specifically or whatever server runs the code, but it took several attempts to finally be able to submit my solution. It kept saying it took over 10 seconds to run. Looking at the other solutions (nearly identical to mine) I feel that either the test are bad or something is going on with the server.
What is the join for?
Why do you put a break statement if you are returning? returning will break you out of there anyways. (Just curious as to why you chose to do that).
my point to it is states you must return null. While this is somewhat design choice, if infinity does not evaluate to null and someone else uses this JS for something else and only test if null then they'll have an error in their JS. It's not a big deal, but technically the code doesn't meet spec.
I don't think these will work in all cases. They don't appear to account for dividing by zero. When I put these solutions in JsFiddle the divide by zero comes back as -Infinity.