Ad
  • Custom User Avatar

    Thank you Moormaster for your solution and links provided on test framework, just realized as u mentioned prompt and alert could not work on this site for reasons of ui specially when we need to apply the test code, and the test should provide input data and result, your description on extracted functions are nice and complete.

    Need a little time to read and understand your code (as i'm a newbie) after that I will reply this post again as im trying to make this challenge complete for submission on kata which now thanks to data you provided should be possible...

  • Custom User Avatar

    Thank you, ye i tried to do it from sctrach and it works fine on my developer but somehow cant figure out the test code that i need to write so that it works on this codewars website too

  • Custom User Avatar

    Description of this Kata is somewhat vague, the 2 example output presented with the Kata are:
    arrayDiff([1,2],[1]) == [2]
    arrayDiff([1,2,2,2,3],[2]) == [1,3]

    There is another possibility in which 1st array has multiple occurrences but the second array does not include that specific value, in which we dont know if the final result should also singleout those multiple occurrences or include all those multiple occurrences:

    arrayDiff([1,2,2,2,3],[1]) == [2,2,2,3]

    or

    arrayDiff([1,2,2,2,3],[1]) == [2,3]