re: Daily Coding Puzzles - Nov 4th - Nov 9th VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Wednesday Array.diff (6 KYU): Your goal in this kata is to implement a difference function, which subtracts one list from another and returns th...
 
function array_diff(a, b) {
  let counter = {};
  for(let i of b) {
    counter[i] = true;
  }
  let result = a.filter(item => counter[item] !== true);
  return result;
}
code of conduct - report abuse