JSFiddle - React, Tailwind, and code Playground
HTML
<a id="myButton" href="#">
click here to get random stuff
</a>
<div id="myRandomDiv">
</div>
JavaScript
var randomStrings = [
"hello 1",
"hello 2",
"hello 3",
"hello 4",
"hello 5",
];
var randomDiv = document.getElementById("myRandomDiv");
document.getElementById("myButton").addEventListener("click", function() {
randomIndex = Math.round((Math.random()*randomStrings.length-1));
newText = randomStrings[randomIndex];
randomDiv.innerHTML = newText;
});