JSFiddle - React, Tailwind, and code Playground

by Emmanuel Garcia

HTML

<div id="background">
<div id="value">0</div>
</div>
<script>
var text = document.getElementById("value").innerHTML;
if (text == "0") {
    document.getElementById("background").style.backgroundColor="red";
}
</script>