Edit Random.pop()

This commit is contained in:
Christoph Diehl 2017-04-12 18:24:44 +03:00
parent 30a9c59613
commit 146009da0e

View file

@ -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;