Code:
<script>
function getq(){
const quotes = ["A","B","C","D","E","F"];
const colr= ["red","green","black","pink"];
var x = Math.floor(Math.random()*quotes.length);
document.getElementById("show").innerText = quotes[x];
document.getElementById("show").style.backgroundColor = colr[x];
document.getElementById("show").style.color = "white";
// alert(quotes[4]);
}
</script>
<div id="show"></div>
<input type="button" onclick="getq()" value="Generate Quotes">
See video - Go to video