JSFiddle - React, Tailwind, and code Playground
by Slico
HTML
<p>The random number is <strong id='demo'></strong></p>
<button type='button' onclick='myRandom()'>Show the random number</button>
<hr>
JavaScript
function myRandom() {
var x = document.getElementById('demo')
x.innerHTML = Math.floor((Math.random() * 100) + 1);
}