> ... 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` :(

The documentation does not match the comments in the code. The code says
this:

   // Now check for duplicates between a and b and only

Which is correct; duplicates *within* an array are not removed. In the
situations where it's being used, jQuery knows that the two arrays don't
have internal duplicates.



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

Reply via email to