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

FULL DISCUSSION
 

JS Solution: Takes two arrays, returns a single array with all of the items from array A, which do not exist in array B.

function diff(a, b){
  return a.filter(item => !b.includes(item))
}
 

Just realized @thesoreon posted almost the same solution already. Oh well, I guess great minds think alike 😜

 

That's nice! When i made this solution i was curious and searched for another approches and found the exact same solution on stack overflow πŸ˜†

code of conduct - report abuse