Skip to content

Instantly share code, notes, and snippets.

@devhero
Created November 13, 2018 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devhero/6486c2f4d1f6fe3b44ccf1d15ab7a683 to your computer and use it in GitHub Desktop.
Save devhero/6486c2f4d1f6fe3b44ccf1d15ab7a683 to your computer and use it in GitHub Desktop.
array compare
array1.length === array2.length && array1.sort().every(function(value, index) { return value === array2.sort()[index]});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment