如何比较MCQS单选按钮输入

时间:2018-02-27 22:49:55

标签: javascript reactjs redux

我在reactjs中创建一个测验,我的数据看起来像

Data.js

{
category: "General Knowledge",
question: "Virgin Trains, Virgin Atlantic and Virgin Racing, are all companies owned by which famous entrepreneur? ",
answers: [
"Alan Sugar",
"Donald Trump",
"Bill Gates",
"Richard Branson"
]
},

用户提交表单后如何将输入的单选按钮与存储所有正确答案的另一个文件进行比较?

Answers.js

[ { "answer": 3 } ]

我正在使用ReactJs和Redux

0 个答案:

没有答案