Is there a way I can determine the intersection between 2 arrays where the indexing is different, like this:
a1 = ["a", "b"]
a2 = ["b", "a"]
/* a1 == a2 should return true */
and of course,
a1 = ["b", "c"]
a2 = ["d", "f"]
/* a1 == a2 should return false */
Or is there any better way to check the similarity between 2 arrays where indexing is different in jQuery/Javascript