Created
January 23, 2021 08:19
-
-
Save KakoozaJerry/3970277bbded4e8263ee0912e2eeb353 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 firstArray = [4, 9, 5]; | |
const secondArray = [9,4,9,8,4]; | |
let intersection = firstArray.filter((el) => { return secondArray.includes(el); }); | |
console.log(intersection) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a function to allow us return a set of intersection elements within two sets and be able to find common elements.