Javascript Array removeDuplicates()
removeDuplicates()
Array.prototype.removeDuplicates = function() { var array = this; return array.filter(function(elem, pos) { return array.indexOf(elem) == pos; })/* w ww . java 2 s . c o m*/ };