JSFiddle - React, Tailwind, and code Playground

by Stéphane LEGRAND

HTML

<button id="lancer"> Lancer de dés! </button>
<p> Le résultat : <p id="resultat"> </p> </p>

JavaScript

$(document).ready(function() {
$("#lancer").on("click", function() {
$( "#resultat" ).html("");
  var result;
  result = Math.floor((Math.random() * 100) + 1);
  $( "#resultat" ).append(result);
 
});
});