« first day (238 days earlier)      last day (628 days later) » 

02:38
posted on June 12, 2014 by CJ Ramki

In this post we are going to see how to compare two array elements? and do something, when the element is matched. This below prototype method will do that trick. Array.prototype.diff = function(arr2) { this.sort(); arr2.sort(); for(var i = 0; i < this.length; i += 1) { if(arr2.indexOf( this[i] ) > -1){ arr2.splice(arr2.indexOf( this[i] ), 1); }

2
 
3 hours later…
05:46
@CJRamki gud mrg

« first day (238 days earlier)      last day (628 days later) »