jlizarraga
11-03-2008, 08:20 PM
I have two arrays that are populated a bit differently, but when they end up with the same content, my check reports that they are in fact different:
http://img224.imageshack.us/img224/7005/wtfhs9.gif
The length property of both arrays is 16, and as you can see by the alert those 16 elements are indeed the same.
Here is the code popping the alert:
if(array1 != array2){
alert("Javascript thinks the following are unequal:\n" + array1 + "\n" + array2);
}
What factors can cause two seemingly identical arrays like this to evaluate to unequal? Any help greatly appreciated!
http://img224.imageshack.us/img224/7005/wtfhs9.gif
The length property of both arrays is 16, and as you can see by the alert those 16 elements are indeed the same.
Here is the code popping the alert:
if(array1 != array2){
alert("Javascript thinks the following are unequal:\n" + array1 + "\n" + array2);
}
What factors can cause two seemingly identical arrays like this to evaluate to unequal? Any help greatly appreciated!