Ad
  • Custom User Avatar

    Please read this: https://docs.codewars.com/training/troubleshooting

    It should remove all values from list a, which are present in list b keeping their order.

    a is an empty list, your code returns b.

  • Default User Avatar

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

  • Custom User Avatar

    The tests are fine:

    JavaScript Completions 49916

    And you can see the expected value for that input is ok.

  • Custom User Avatar
  • Custom User Avatar

    Except basic test all other tests passes for me. please review tests.

    Should pass Basic tests

    a was [1,2], b was [1]: expected [] to deeply equal [ 2 ]

    Random tests - 40 of them passed
    Testing for arrayDiff([-13,-13,14,6,-9,-15,3,-16,-1,-11,8,4,-4,-11,-6,-10,-2,-10,-12,-10],[-13,-11,-13,-16,6,-9,14,-6,-10,3,-11,-15,-1,-10,-10,-2,-12])
    Testing for arrayDiff([-6,0,-11,-5,7,4,-1,-1,-5,17,12,-19,2,-15,-19,-14,-16,-2,-16],[17,-11,-14,-16,-6,-19,-1,-15,-5,-2,-19,-1,0,4])
    Testing for arrayDiff([5,-6],[])
    Testing for arrayDiff([-16,-18,-15,-13,18,8,11,-16,14,-11,-8,-6,-4,-7,-16,1,-5,-4,-8,-19],[14,-4,-4,-8,-7,-15,-18,-8,1,18,11,-16])
    Testing for arrayDiff([-17,-1],[-17])
    Testing for arrayDiff([9,16,-10,12,4,-17,8,-20,14,-7,-3,7,-9,-11,-15,5,-16,-2,8],[-10,-20,8,-16,-9])
    Testing for arrayDiff([8,12,2],[2])
    Testing for arrayDiff([-8,-15,-12],[-15,-8])