Edit Random.pop()

This commit is contained in:
Christoph Diehl 2017-04-12 18:24:44 +03:00
parent 30a9c59613
commit 146009da0e
1 changed files with 2 additions and 2 deletions

View File

@ -144,9 +144,9 @@ var random = {
},
pop: function (arr) {
// 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);
return obj;