[英]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: 这是工作示例:
https://jsfiddle.net/yhosftnt/ https://jsfiddle.net/yhosftnt/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.