JSFiddle - React, Tailwind, and code Playground
by ninty9notout
HTML
<h1 id="excuse"></h1>
JavaScript
Array.prototype.random = function () {
return this[Math.floor((Math.random() * this.length))];
}
var leadIn = [
"I'm sorry but",
"Please forgive me",
"Beg you a thousand pardons",
"I apologise, however",
"I'm never usually like this",
"Guess what happened?!?",
"Holy shit! Get this",
"Boy do I have a story for you",
"So I was minding my own business and boom!",
"The most unbelievable thing just happened"
];
var perpetrator = [
"your mum",
"Princess Peach",
"Godzilla",
"the offensive line of the '76 Dallas Cowboys",
"a handicapped gentleman"
];
var delayingFactor = [
"gave me a hickey.",
"tried to kill me.",
"ran me over with a diesel backhoe."
];
document.getElementById('excuse').innerHTML = [leadIn.random(), perpetrator.random(), delayingFactor.random()].join(' ');