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 96d077b commit 27d32e1Copy full SHA for 27d32e1
Sprint-3/quote-generator/quotes.js
@@ -491,3 +491,14 @@ const quotes = [
491
];
492
493
// call pickFromArray with the quotes array to check you get a random quote
494
+const displayQuote = document.querySelector("#quote");
495
+const displayAuthor = document.querySelector("#author");
496
+const btn = document.querySelector("#new-quote");
497
+
498
+function quoteGenerator() {
499
+ const myQuotes = pickFromArray(quotes);
500
+ displayQuote.textContent = myQuotes.quote;
501
+ displayAuthor.textContent = myQuotes.author;
502
+}
503
504
+btn.addEventListener("click", quoteGenerator);
0 commit comments