SyntaxFix
Write A Post
Hire A Developer
Questions
If you want to check only if two arrays have same values (regardless the number of occurrences and order of each value) you could do this by using lodash:
_.isEmpty(_.xor(array1, array2))
Short, simple and pretty!