let firstplayerturn = 1;
if (firstplayerturn == 1) {
value_input = document.getElementById("b1").value;
if (value_input === "0") {
alert("ERROR");
}
firstplayerturn = 0;
} else {
}
<input type="text" id="b1" class="box">
My expectation was that during the first player's turn in the game, the input of "0" should not be accepted. This is why I included the following check:
if (value_input === "0") {
alert("ERROR");
}