JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<body>
<div id="output">0</div>
<button id="increment">Increment</button>
<script>
var counter = 0;
var output = document.getElementById('output');
document.getElementById('increment').onclick = function() {
counter += 1;
output.innerHTML = counter;
};
</script>
</body>
</html>