JSFiddle - React, Tailwind, and code Playground

HTML

<form>
        <label id="question">Question:</label><br />
        <div id="answersBox">
        </div>
        <input type="button" value="save" />
    </form>

JavaScript

var allQuestions = [{question: "This is question number one", choices: ["one", "two", "three", "four"], correctAnswer:"two"},{question: "This is question number two", choices: ["dog", "cat", "bear", "lion"], correctAnswer:"bear"}];

var currentQuestion = allQuestions[1].question;
document.getElementById('question').innerHTML = currentQuestion;


var frag = document.createDocumentFragment();

for (choices in allQuestions[0]) {

    var choiceSelection = document.createElement('input');
    choiceSelection.setAttribute('type', 'radio');
    choiceSelection.setAttribute('name', 'choice');
		choiceSelection.setAttribute('value','uo');
    let text = doc
    frag.appendChild(choiceSelection);
}

document.getElementById('answersBox').appendChild(frag);