Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Passes that test now. Cool. Thanks so much.

  • Custom User Avatar

    I've just checked the description and this particular test indeed contradicted it. Reset the trainer and try your code again.

  • Custom User Avatar

    I can't see the tests. When I write the test according to the demands in the instructions, it's correct. There's no indication about how the input object should be modified. I'm left guessing what the issue could be.

  • Custom User Avatar

    I think the JavaScript tests should be tweaked. There's a few questions about it. Coders have to mess with it in order to get it to pass.

    What's wrong? How should it be tweaked? Why? All tests are correct, and expect you to modify the input object.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    fixed by modifying the input object

  • Custom User Avatar

    [JS]

    for test "handles deeply nested objects"
    my output is

    {"a1":1,"a2":2,"a":{"b":{"c":{"d":{"e":{"f":{"g":{"h":{"i":{"j":{"k":{"depth":11},"depth":10},"depth":9},"depth":8},"depth":7},"depth":6},"depth":5},"depth":4},"depth":3},"depth":2},"depth":1},"depth":0}
    

    but I got

    Wrong deepest depth - Expected: 11, instead got: undefined

    why?

  • Custom User Avatar

    could also use tree.constructor === Object

  • Custom User Avatar

    the 'typeof' output for [] is 'object' in ES6 which seems to make things hard...

  • Custom User Avatar

    I had to modify the original JS object to get the tests to pass.
    I thought that was really bizarre. So bizarre that I couldn't tell why my solution wasn't working properly at first.

  • Custom User Avatar

    I don't see any modification to the tests. did you update them or not?

  • Custom User Avatar

    Thanks, I thought I had that fixed in the reference solution which was mutating input originally. It should be fixed now as it does a deep / independent clone.

    I am going to add a check to Ruby's input mutation in the test suite given Ruby has a bang notation for mutating functions.

  • Custom User Avatar

    @cliffstamp:

    and AGAIN, you messed the things up...

    ruby: random tests send the expected output to the user: see this fork

  • Custom User Avatar

    Could you not close the issues before they are resolved, ffs?

  • Loading more items...