Random value generation javascript

I have some code for storing a random value from an array into a variable like this:\[code\]Quest=["value1","value2","value3","value4"];var random=Math.floor( Math.random() * Quest.length );var question = Quest[random];\[/code\]I call the second and third lines of code several times,so the same value gets generated more than once.Does anyone have any idea for some efficient code to ensure that the same value is not repeatedly generated more than once in order?
 
Back
Top