Created
March 20, 2020 10:03
-
-
Save emmabostian/c64bfd70006bd9dbd3001b4f7d2b3b0d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function uniteUnique(...arr) { | |
let flatArray = arr.flat(); | |
const set = new Set(flatArray); | |
return Array.from(set); | |
} | |
uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment