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.
@meditatingCybermind what do you think about
.fill(1)
and[...Array(n).keys()]
?Yes, you should use Math.trunc() to be on the safe side.
This comment is hidden because it contains spoiler information about the solution
It seems this is now implemented. Can you confirm?
For the solution with every, [undefined].sameStructureAs([[1,[2]]]) returns true while [[1,[2]]].sameStructureAs([undefined]) returns false.
Maybe this is a very exotic test case, but I like the idea of a.sameStructureAs(b)==b.sameStructureAs(a), which is violated here.
+Infinity :-)
+1, even a fraction of it, but often completing a kata with another language can be quite challenging.
I like the way you did yours, I didn't realize I was allowed to change x and y to something else. Also, what does the 'use strict' bit mean?
yeah. also it's not the best practise to call the variables "x", "n" or "z".
OK, approved!