JSFiddle - React, Tailwind, and code Playground

by Tom Randolph

HTML

<div class="question">
    <div class="multipleChoice" id="multipleChoice">
        <input value="X" onclick="del(this);" style="float:right;" type="button">
        <textarea id="questionText">Question Text</textarea><br>
        <textarea id="option_correct">Correct Answer</textarea><br>
        <textarea id="option_4">Option 4</textarea><br>
        <textarea id="option_4">Option 3</textarea><br>
        <textarea id="option_4">Option 4</textarea>
    </div>
</div>

JavaScript

questions = document.getElementsByClassName('question');
questions = [].slice.call(questions);
questionArr = [];
for(q=0; q<questions.length; q++){
  alert(questions[q].innerHTML);
}