Ad
  • Default User Avatar

    HI all, I just figured out how to check the tested input and its awesome :)

    however I am struggling here to find out how to replace the undefined or empty arrays (groups that are empty but not at the end of the groupings array).

    So like instead of:
    [[1,2,3|,[12,15],,[34,37]

    I have
    [[1,2,3|,[12,15],undefined (or []),[34,37]

    Can somebody help me please? I really worked many hours on this issue and I would love to be able to submit it :)

    Thanks, Ra

  • Default User Avatar

    thanks a lot Akar! the documentations did not help but watching youtubers solve the katas I realized you can just add console.log(what_ever_inputs_gets_tested) and see for yourself what the test case is.

    Very stupid of me.

  • Custom User Avatar

    In your IDE you cannot test the whole bunch of tests, which include random tests. Don't be disappointed, this is very common, and the work you have done was probably not in vain, it just probably means it needs some extra adjustments. You should try to debug your solution understanding the cases where it fails. If you feel helpless (and even if you don't), you may find some helpful tips in the official documentation: https://docs.codewars.com/training/troubleshooting/

  • Custom User Avatar

    Hi there, this is already my second kata that I can solve on my vs code but not in here and I would really love to figure out how I can check the test cases that did not make it.

    As with the others I got 105 correct and 3 incorrect cases.

    Can somebody please help?

    Its a huge disapointment working for hours on an issue, figuring out what it is and being rejected for reasons that seem totally weird. Thank you very uch!

  • Default User Avatar

    sorry I wasnt able to put it in a better form. I am not really getting codewars I think :(

  • Default User Avatar

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

  • Default User Avatar

    Hi Akar, thank you.

    I think it might be the length of the solution array. Ill try to change that or come back with better explanation.

    Best,
    Ra

  • Custom User Avatar

    Hi. It's not clear what's the problem you are trying to point out here. Could you be more explicit please? Maybe start reading there: https://docs.codewars.com/getting-started/solving-kata

    I tried your code on sample tests and it gives things like that:

    expected [ [ 1, 2, 3 ],
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined ] to deeply equal [ [ 1, 2, 3 ] ]
    

    Which means your code return the first array (array with several undefineds while it should have returned the second one [[1,2,3]]). This is a good starting point to try debugging your code.

  • Default User Avatar

    hi all, I have solved the issue on JS in my visual code studio but cannot pass the tests.

    for example this input: console.log(groupIn10s(1,12,24,17,41,62,99,73,3));
    gives this output:

    [ [ 1, 3 ],
    [ 12, 17 ],
    [ 24 ],
    undefined,
    [ 41 ],
    undefined,
    [ 62 ],
    [ 73 ],
    undefined,
    [ 99 ] ]

    I think i don't know yet (new here) how to test and run codes.

    Can somebody pls help me?
    Thanks