Ad
  • Custom User Avatar

    The current top solution would return true for a test case like this that should be false:
    [1,[1]].sameStructureAs([1,[[[]]]]);
    It's not the same structure as the 2nd array has a nesting of several arrays deeper than the first.