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 fb9b865 commit 2d49b11Copy full SHA for 2d49b11
1 file changed
Sprint-3/quote-generator/quotes.js
@@ -1,13 +1,13 @@
1
-function setup() {
+function randomQuote() {
2
const randomQuote = pickFromArray(quotes);
3
document.querySelector("#quote").innerText = randomQuote.quote;
4
document.querySelector("#author").innerText = randomQuote.author;
5
}
6
-function newQuote() {
7
- document.getElementById("new-quote").addEventListener("click", setup);
+function setup() {
+ document.getElementById("new-quote").addEventListener("click", randomQuote);
8
9
-newQuote();
10
-window.addEventListener("load", setup);
+setup();
+window.addEventListener("load", randomQuote);
11
// DO NOT EDIT BELOW HERE
12
13
// pickFromArray is a function which will return one item, at
0 commit comments