Node.js examples for Array:Array Value
Get distinct value from array
Array.prototype.distinct = function (){ var ret = []; for(var i=0;i<this.length;i++){ if(this.indexOf(this[i])!=i){ ret.push(this[i]);//from w w w .j a v a2s. co m } } return ret; } console.log(['a','b','c','d','b','"a"','e','1','2','3','2','"3"'].distinct());