if (questionNumber == 1) { if (answer.value == `some answer 1`) { // show correct message } else { // show incorrect message } } else if (questionNumber == 2) { if (answer.value == `some answer 2`) { // show correct message } else { // show incorrect message } }