I needed to create an algorithm which will (efficiently) take an old array and a new array and give me back the changes between the two (which items added, which removed). It ha
// I prefer to not sort the arrays Array.prototype.diff= function(ar){ var a= [], i= 0, L= this.length, ar= ar.concat(), t1, t2; while(i