Array.prototype.deleteEach = function ( value ) { for ( var i = this.length;i; this[ --i ] === value && this.splice( i, 1 )); return this; }; alert(['test1', 'test2', 'test3', 'test3', 'test5', 'test6'].deleteEach( 'test3' ));