Javascript Array repeat_element(element)
Array.prototype.repeat_element = function(element) { var repeat = false; /*from ww w . j a v a 2 s . c om*/ for (i=0;i<this.length;i++) { if(element==this[i]) repeat = true; } return repeat; }