I managed to pull a string element from My_array then remove it temporarily till the next browser refresh but how to remove it completely so that element is completely gone?
<script>
Array.prototype.randsplice = function() {
var ri = Math.floor(Math.random() * this.length);
var rs = this.splice(ri, 1);
return rs;
};
var my_array = ['A', 'B', 'C', 'D', 'E', 'F', 'G'];
var result = my_array.randsplice();
document.write(result);
document.write("<hr>");
document.write(my_array);