dimanche 20 novembre 2016

How to randomize quiz questions order in multidimensional array?

var questions =[
new Question ("Who is the president of Czech Republic?", ["Donald Trump", "Andrej Kiska", "Milos Zeman", "Angela Merkel"], "Milos Zeman"),
new Question ("The capital of Czech Republic is:", ["Brno", "Ostrava", "Hradec Kralove", "Prague"], "Prague"),
new Question ("Which food is not common Czech food?", ["Cevapcici", "Svickova", "Trdelnik", "Tatarak"], "Cevapcici")];
var quiz = new Quiz(questions);
populate();

How do I randomize the order of the questions in this quiz? Here is the working sample:

http://ift.tt/2eUOeau




Aucun commentaire:

Enregistrer un commentaire