Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js compare arrays

var a1 = [1,2,3];
var a2 = [1,2,3];
console.log(a1==a2);    // Returns false
console.log(JSON.stringify(a1)==JSON.stringify(a2));    // Returns true
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #compare #arrays
ADD COMMENT
Topic
Name
4+4 =