lundi 18 juillet 2016

How to check if two arrays are equal with JavaScript?


var a = [1, 2, 3]; var b = [3, 2, 1]; var c = new Array(1, 2, 3); alert(a == b + "|" + b == c); demo How can I check these array for equality and get a method which returns true if they are equal? Does jQuery offer any method for this?

Aucun commentaire:

Enregistrer un commentaire