I\'m looking for an efficient way to find out whether two arrays contain same amounts of equal elements (in the == sense), in any order:
==
foo = {
i wasn't sure if "===" is ok, the question is a bit vauge... if so, this is quite a bit faster and simpler than some other possible ways of doing it:
function isSame(a,b){ return a.length==b.length && a.filter(function(a){ return b.indexOf(a)!==-1 }).length == b.length; }