Ad
  • Custom User Avatar

    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?

  • Custom User Avatar

    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.

  • Custom User Avatar

    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?