Не стал читать все, но если я правильно понял то вот вариант решения:
<div id="question1" class="question">
Question.
<input type="radio" name="question1" value="0" />Anwer1
<input type="radio" name="question1" value="1" />Anwer1
</div>
<div id="question2" class="question">
Question.
<input type="radio" name="question2" value="0" />Anwer1
<input type="radio" name="question2" value="1" />Anwer1
</div>
function showRightAnswers() {
var answers = [0, 1],
elements = document.getElementsByClassName("question"),
rightAnswers = [];
for(var i = 0, leng = elements.length, answer; i < leng; i++) {
answer = elements[i].querySelector(":checked");
if(answer.value == answers[i]) {
rightAnswers.push(elements[i]);
}
}
console.log(rightAnswers);
for(var i = 0, leng = rightAnswers.length; i < leng; i++) {
rightAnswers[i].style.border = "1px solid black";
}
}