Multiple Choice and True/False Questions with JavaScript
{"questions":[{"questionType":"MCQ","question":"What is a blockchain?","options":["A. A Currency","B. A centralized ledger","C. A type of cryptocurrency","D. A distributed ledger on a peer to peer network"],"selectedAnswer":"","correctAnswer":"B"},{"questionType":"True/False","question":"The fs.read() method is used to read files on your computer.","options":["A. True","B. False"],"selectedAnswer":"","correctAnswer":"B"},// Add more questions here],questions.map((question, index) => (
<h5 className="mt-4 mb-0">{question.questionType}
{index+1}.{question.question}{question.options.map((option, optionIndex) => (
)){index+1}.{question.question}{question.options.map((option, optionIndex) => (
{option}
))}原文地址: https://www.cveoy.top/t/topic/pEFn 著作权归作者所有。请勿转载和采集!