function check(element) {
    if (element.id == questions[currentIndex].answer) {
        element.className = "correct"
        updateAnswersTracker("correct")
        score++
    } else {
        element.className = "wrong"
        updateAnswersTracker("wrong")
    }
    disableClick();
}
//Check if selected answer is correct or wrong
Check if selected answer is correct or wrong
Check if selected answer is correct or wrong
function check(element) {
    if (element.id == questions[currentIndex].answer) {
        element.className = "correct"
        updateAnswersTracker("correct")
        score++
    } else {
        element.className = "wrong"
        updateAnswersTracker("wrong")
    }
    disableClick();
}
function check ( element ) { if ( element . id == questions [ currentIndex ] . answer ) { element . className = "correct" updateAnswersTracker ( "correct" ) score ++ } else { element . className = "wrong" updateAnswersTracker ( "wrong" ) } disableClick ( ) ; }
Check if selected answer is correct or wrong
Check if selected answer is correct or wrong