You need to write some logic. Below is one sample example.
var list = [1, 2, 3, 4, 5];
var listDone = [];
var inProcess = true;
while(inProcess){
var randomQuiz = Math.floor(Math.random() * list.length);
var isDone = false;
for (var j = 0; j < listDone.length; j++) {
if (listDone[j] === randomQuiz)
isDone = true;
}
if (!isDone) {
console.log(list[randomQuiz]);//Display if not Done.
listDone.push(randomQuiz);
}
if (list.length == listDone.length)
inProcess = false;
}