Created
May 22, 2019 00:28
-
-
Save codeBelt/95b768ed2a63d7e4e12b5333993d38b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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