I\'ve been searching around for some answers to this issue, but nothing seems to work when I try to find a solution.
What I\'m trying to achieve is to make a spinner
It looks like you already have an array of the possible values. In this case you can simply shuffle the array and go through it. JavaScript doesn't have a built in shuffle function, but its pretty simple to implement.
Here is an example of a Fisher–Yates shuffle
function shuffle(array) {
for(var i = array.length; i > 1; i--) {
var r = Math.floor(Math.random() * i);
var temp = array[r];
array[r] = array[i-1];
array[i-1] = temp;
}
}