List of utility methods to do Array Remove Max
var a = [2,12,34,4]; Array.prototype.removeMax = function(){ var max1 = Math.max.apply(null,this); var pos = this.indexOf(max1); return this.splice(pos,1); a.removeMax();