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.
awesome, thanks for adding the new lines for each language - i did a couple of small tweaks to the description & have approved :)
good point ... have done that now :)
Oh right got it .... have updated. Thanks
thanks, have approved
thanks for your suggestions, esp the heads up on for… in, I hadn’t come across enumerable/non-enumerable properties so that’s useful to know about
The same for Test.inspect() - have updated the code
I’m a bit lost on point 3 though - determine expected before actual. Are you saying there’s a work around which I need to test against? I had a look at your solution but can’t figure out how it works, when i ran it myself it gave the wrong answer
@dcsmith that's interesting, i haven't come across the PHP count function. (This is my first kata and javascript is my fist programming language, so currently a bit above my pay grade!) I'm now going to google tree of arrays :)
Hey @donaldsebleung yeah I think I could have done it either way, but i couldn't find another kata on here quite like this where you count all elements whether it's arrays, numbers, strings etc ... I've updated the random tests as well so the nesting level / level of recursion is random up to 4 :)
Yeah I was strugling slightly to randomise creating a multi dimensional array. I've got it working now, have updated the tests :)
I've got the same issue as someone below which is that I fail one test case with the error meesage "Value is not what was expected". Is it possible to add something to say what the input value was in this case?
Hey. Just couple of typos I noticed ... "salery" in the first line and "expect" rather than except in the last. Hope that's helpful :)