Looks like it only removed one set of duplicates.

<!----------------//------
andy matthews
web developer
certified advanced coldfusion programmer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--------------//--------->

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Choan C. Galvez
Sent: Thursday, October 19, 2006 12:31 PM
To: jQuery Discussion.
Subject: [jQuery] Question about jQuery.merge


Hi all.

I've been browsing the API and discovered the docs for `jQuery.merge`.
Great!

One question about it: the docs say:

"Merge two arrays together, removing all duplicates. The final order
or the new array is: All the results from the first array, followed by
the unique results from the second array."

But, if I merge the arrays

var a = [ 2, 3, 4, 5 ];
var b = [ 1, 1, 2, 3, 5 ];

I get:

[ 2,3,4,5,1,1 ]

So a) the "removing all duplicates" is not an exact definition of what
this method does or b) there is a bug in `merge` :(

Anyway, I'd label it as "unexpected behavior".
--
Choan
<http://choangalvez.nom.es/>

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to