Ad
  • Custom User Avatar

    Sorry. I have no theories.

    But you have Example Tests source code, so if I was you I would be looking to debug that in some more detail. For example...

     var got = spaghettiCode(plate);
     // you you debug the value of var got here...
     // you should debug the value of var info.longestIDs here...
     // you should debug the result of info.longestIDs.includes(got) here...
     Test.expect(got != '' && info.longestIDs.includes(got))
    

    ...to see what that got really is. I know you say you printed a B but maybe you are fooling yourself and it is really 'B\n' or a 'B ', or maybe you arrived ar the correct answer 'B' but forgot to return it from the function?

    The bottom line is 43 other people passed this OK that points to the problem being at your end somehow.

  • Custom User Avatar

    Longest spaghetti: B is length 11
    B
    (This is a console.log of my answer and just to make sure I did String(myAnswer))
    ✘ Value is not what was expected
    Completed in 2ms
    ex2
    Log
    AAAAAAAAA
    _______A__CCC
    B C A C
    B___C__A____C
    B C C
    B___CCCCCCCCC

    Longest spaghetti: C is length 18
    (This is a console.log of my answer and just to make sure I did String(myAnswer)) C

  • Custom User Avatar

    Which test fails? What is the message?

  • Custom User Avatar

    Hi my answer is coming out correct with (according to the example tests) 'B' and then 'C' but it is saying Not the expected results. Any theories?

  • Custom User Avatar

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