Javascript Array popRandomElement()

Description

Javascript Array popRandomElement()

Array.prototype.popRandomElement = function(){
 return this.splice(this.randomIndex(), 1)[0]
}



PreviousNext

Related