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.
I've implented a recursive solution using a helper function that passes 500 of 501 tests, but is failing on 'u r using restricted stuff'. There is no for, or while loop anywhere in my code. I did make use of default parameters and modulo operators.
What exactly besides loops is restricted? Has anyone else had this problem?
If you attempted to delete elements of an array without using the .splice() method, a blank - 'undefined' - element is left in the array at that spot. Try pushing only the elements of interest to a new array, or using splice instead of delete.
I'm consistently able to generate arbitrarily large diamonds, however, I'm failing most of the test cases. I've attempted to prepend a new line at the end before the final string return, and still not getting the proper result. Has anyone had other issues with seemingly perfect diamonds failing the tests?