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 0cc51cd commit 903eebeCopy full SHA for 903eebe
1 file changed
Sprint-3/quote-generator/quotes.js
@@ -498,11 +498,12 @@ function displayRandomQuote() {
498
document.getElementById("quote").textContent = randomQuote.quote;
499
document.getElementById("author").textContent = randomQuote.author;
500
}
501
+function setup() {
502
+ displayRandomQuote();
503
-// run when page loads2
-displayRandomQuote();
504
-
505
-// button click
506
-document
+ document
507
.getElementById("new-quote")
508
.addEventListener("click", displayRandomQuote);
+}
+
509
+window.addEventListener("load", setup);
0 commit comments