by the way: [].combine([1,2,2,3,4,4,4]) will return [1,2,3,4], and this function is still into mootools more:
http://mootools.net/docs/more/Native/Array.Extras#Array:unique You guys should look more at mootools-more (got it, more..more, yeah you got it). -- Fábio Miranda Costa Solucione Sistemas Engenheiro de interfaces On Wed, Dec 23, 2009 at 6:24 PM, Trevor Orr <[email protected]> wrote: > Cool, it now becomes. > > Array.prototype.unique = function() { > > var outArray = new Array(); > > this.each(function(val) { > outArray.include(val); > }); > > return outArray; > > } > > > On Wed, Dec 23, 2009 at 12:14 PM, Sanford Whiteman < > [email protected]> wrote: > >> > if (!outArray.contains(val)) { >> > outArray.push(val); >> > } >> >> You could use Array.include here. >> >> -- Sandy >> >> >
