JSFiddle - React, Tailwind, and code Playground
HTML
<div id="fontfamily">Ash</div>
JavaScript
var fontType = [ "Arial", "Verdana", "Helvetica"];
var num;
num=Math.floor(Math.random()*3);
document.getElementById("fontfamily").style.fontFamily =fontType[num];
console.log(num)