*shouldn't allow* is what I meant.

I even found this

Array.prototype.unique = function () {
        var r = new Array();
        o:for(var i = 0, n = this.length; i < n; i++)
        {
                for(var x = 0, y = r.length; x < y; x++)
                {
                        if(r[x]==this[i])
                        {
                                continue o;
                        }
                }
                r[r.length] = this[i];
        }
        return r;
}

and gave it a shot and still get the duplicates.  Certainly there's
something I'm misunderstanding about arrays.

On Jul 7, 8:58 am, Ryan Florence <[email protected]> wrote:
> I've got some code that is using include() but it's kicking our arrays  
> that look like this:
>
> [[4, 3], [4, 4], [3, 1], [3, 2], [3, 2], [2, 0], [2, 1], [2, 1], [2, 1]]
>
> When I'd expect
>
> [[4, 3], [4, 4], [3, 1], [3, 2], [2, 0], [2, 1]]
>
> Any idea why?  Here's the code:http://paste.mootools.net/m29973258

Reply via email to