Skip to content

Instantly share code, notes, and snippets.

@neos1803
Created January 26, 2023 03:32
Show Gist options
  • Save neos1803/be02714fc47dbccef7ad0e5512a81693 to your computer and use it in GitHub Desktop.
Save neos1803/be02714fc47dbccef7ad0e5512a81693 to your computer and use it in GitHub Desktop.
Javascript one liner two arrays duplicate checking
const duplicate = arr1.filter((v) => arr2.includes(v)).length > 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment