JSFiddle - React, Tailwind, and code Playground

HTML

<button id="button">
  Click Me!
</button>

<p id="mois">

</p>

JavaScript

var m = document.getElementById('mois');
var button = document.getElementById('button');
var months = ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"];

function displayMonth(){
	var n = Math.floor(Math.random() * months.length - 1) + 1
  m.innerHTML = months[n];
  months.splice(n, 1);
  console.log(months);
}


button.addEventListener('click', displayMonth);