JSFiddle - React, Tailwind, and code Playground

HTML

Question 1: how much is 8 x 4? <br><input type="text" id="question1"> <br>
<button onclick="question1()">Check if your answer is correct?</button> 

<script>
function question1() {
    var value = document.getElementById("question1").value;
    if (value == 32) {
        window.alert("correct!");
    } else {
        window.alert("try again");
    }
}
</script>