Skip to content

Instantly share code, notes, and snippets.

@codeBelt
Created May 22, 2019 00:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codeBelt/95b768ed2a63d7e4e12b5333993d38b3 to your computer and use it in GitHub Desktop.
Save codeBelt/95b768ed2a63d7e4e12b5333993d38b3 to your computer and use it in GitHub Desktop.
const intersection = array1.filter(element => array2.includes(element));
const intersection = array1.some(element => array2.includes(element));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment