SyntaxFix
Write A Post
Hire A Developer
Questions
I know this is an old question and the answers provided work fine ... but this is a bit shorter and doesn't require any additional libraries ( i.e. JSON ):
function arraysAreEqual(ary1,ary2){ return (ary1.join('') == ary2.join('')); }