JSFiddle - React, Tailwind, and code Playground
HTML
<blockquote id="randomquote">
<p></p> <cite>— <a href="#" target="_blank"></a></cite>
</blockquote>
JavaScript
var myQuotes = [{
quote: "To err is human; to forgive, divine.",
cite: "Alexander Pope",
url: "http://www.example.com"
}, {
quote: "Reports of my death have been greatly exaggerated.",
cite: "Mark Twain",
url: "http://www.example.com"
}, {
quote: "A line of oversize watches that can offer many of the attributes of premium luxury watches at an affordable price.",
cite: "Horozima",
url: "http://www.horozima.com/2012/07/terranaut-xl-50mm.html"
}];
var randomQuote = Math.floor(Math.random() * myQuotes.length)
$('p', '#randomquote').text(myQuotes[randomQuote].quote);
$('cite a', '#randomquote').attr('href', myQuotes[randomQuote].url).text("" + myQuotes[randomQuote].cite);