We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba9667d commit 8eb4652Copy full SHA for 8eb4652
1 file changed
Sprint-3/quote-generator/quotes.js
@@ -491,3 +491,18 @@ const quotes = [
491
];
492
493
// call pickFromArray with the quotes array to check you get a random quote
494
+
495
+function showRandomQuote() {
496
+ const randomQuote = pickFromArray(quotes);
497
498
+ const quoteP = document.querySelector("#quote");
499
+ const authorP = document.querySelector("#author");
500
501
+ quoteP.innerText = randomQuote.quote;
502
+ authorP.innerText = randomQuote.author;
503
+}
504
505
+showRandomQuote();
506
507
+const newQuoteBtn = document.querySelector("#new-quote");
508
+newQuoteBtn.addEventListener("click", showRandomQuote);
0 commit comments