Created
September 18, 2020 17:57
-
-
Save gregzanch/8e49e1010dec838de5ed780c5960592a to your computer and use it in GitHub Desktop.
some array operations
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
const diff = (A,B) => [A,B].map((x,i,a)=>x.filter(y=>!a[(i+1)%2].includes(y))); | |
const unique = (A,B) => [...new Set([...A, ...B])]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment