Posts by Ellyson Silva • 41 points
1 post
-
4
votes6
answers7015
viewsA: How to get unique values in a Javascript array?
Another solution would be. Array.prototype.getUnique = function(){ var u = {}, a = []; for(var i = 0, l = this.length; i < l; ++i){ if(u.hasOwnProperty(this[i])) { continue; } a.push(this[i]);…