Ad
  • Custom User Avatar

    No, I'm sorry, I just gave up after infinite tries

  • Custom User Avatar

    Hi, thanks for the answer but I don't think you got the problem (or maybe I don't get your answer). I know that table isn't regular and my program recognizes it too, but only if I reorganise the input of the test as an array of arrays, as it should be. I'm thinking the problem might be that that input given by the test isn't an array as the others, but something else. I can't understand what type of data is that: it has spaces, so it isn't a number, but it hasn't the quotes, then it isn't a String.

  • Custom User Avatar

    Ok, thanks. Edit: I wrote that same input as an array of arrays:
    console.log(validSolution([[1, 2, 3, 4, 5, 6, 7, 8, 9],
    [1, 2, 3, 4, 5, 6, 7, 8, 9],
    [1, 2, 3, 4, 5, 6, 7, 8, 9],
    [1, 2, 3, 4, 5, 6, 7, 8, 9],
    [1, 2, 3, 4, 5, 6, 7, 8, 9],
    [1, 2, 3, 4, 5, 6, 7, 8, 9],
    [1, 2, 3, 4, 5, 6, 7, 8, 9],
    [1, 2, 3, 4, 5, 6, 7, 8, 9],
    [1, 2, 3, 4, 5, 6, 7, 8, 9]]))
    and the result is "false".
    Obviously if I do this:

    console.log(1 2 3 4 5 6 7 8 9
    1 2 3 4 5 6 7 8 9
    1 2 3 4 5 6 7 8 9
    1 2 3 4 5 6 7 8 9
    1 2 3 4 5 6 7 8 9
    1 2 3 4 5 6 7 8 9
    1 2 3 4 5 6 7 8 9
    1 2 3 4 5 6 7 8 9
    1 2 3 4 5 6 7 8 9)
    it gives error. Do someone have an idea?

  • Custom User Avatar

    Hi, can someone explain me why it expects this to be 'true'? And what does that 'pre' mean? And why the input isn't an array? My function seems to work on other tests. Thanks a lot

    Expected 'true' on input of

    1 2 3 4 5 6 7 8 9
    1 2 3 4 5 6 7 8 9
    1 2 3 4 5 6 7 8 9
    1 2 3 4 5 6 7 8 9
    1 2 3 4 5 6 7 8 9
    1 2 3 4 5 6 7 8 9
    1 2 3 4 5 6 7 8 9
    1 2 3 4 5 6 7 8 9
    1 2 3 4 5 6 7 8 9
    : expected false to equal true