assets/js/app.js
// This function checks the selected answer and manipulates the DOM
This function checks the selected answer and manipulates the DOM
This function checks the selected answer and manipulates the DOM
function checkAnswer(e) {
    var target = e.target;
    if (target.matches('button')) {
        if (target.textContent == currentQuestionInfo.answer) {
            logCorrectAnswer(target);
        } else {
            logIncorrectAnswer(target);
        }
    }
}
function checkAnswer ( e ) { var target = e . target ; if ( target . matches ( 'button' ) ) { if ( target . textContent == currentQuestionInfo . answer ) { logCorrectAnswer ( target ) ; } else { logIncorrectAnswer ( target ) ; } } }
This function checks the selected answer and manipulates the DOM
This function checks the selected answer and manipulates the DOM
//Get the click target //If the part of the container that was clicked was a button //Check the textContent of that button against the answer