Javascript Array randsplice()

Description

Javascript Array randsplice()


Array.prototype.randsplice = function(){
    var ri = Math.floor(Math.random() * this.length);
    var rs = this.splice(ri, 1);
    return rs;//from   w ww .j  a  va2s. com
}



PreviousNext

Related