Edit Random.pop()
This commit is contained in:
parent
30a9c59613
commit
146009da0e
1 changed files with 2 additions and 2 deletions
|
@ -144,9 +144,9 @@ var random = {
|
||||||
},
|
},
|
||||||
pop: function (arr) {
|
pop: function (arr) {
|
||||||
// Removes and returns a random item from an array
|
// Removes and returns a random item from an array
|
||||||
var i, obj;
|
let i, obj;
|
||||||
|
|
||||||
obj = Random.item(arr);
|
obj = this.item(arr);
|
||||||
arr.splice(arr.indexOf(obj), 1);
|
arr.splice(arr.indexOf(obj), 1);
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
|
|
Loading…
Reference in a new issue