DEV Community

Discussion on: Solving "Seek and Destroy" / freeCodeCamp Algorithm Challenges

Collapse
ttatsf profile image
tatsuo fukuchi

Another way:

const destroyer = (xs, ...ys) =>
  xs.filter( 
    e => ! ys.includes(e) 
  )
Enter fullscreen mode Exit fullscreen mode