Skip to content

Commit 2d49b11

Browse files
committed
renamed functions to be more descriptive.
1 parent fb9b865 commit 2d49b11

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Sprint-3/quote-generator/quotes.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
function setup() {
1+
function randomQuote() {
22
const randomQuote = pickFromArray(quotes);
33
document.querySelector("#quote").innerText = randomQuote.quote;
44
document.querySelector("#author").innerText = randomQuote.author;
55
}
6-
function newQuote() {
7-
document.getElementById("new-quote").addEventListener("click", setup);
6+
function setup() {
7+
document.getElementById("new-quote").addEventListener("click", randomQuote);
88
}
9-
newQuote();
10-
window.addEventListener("load", setup);
9+
setup();
10+
window.addEventListener("load", randomQuote);
1111
// DO NOT EDIT BELOW HERE
1212

1313
// pickFromArray is a function which will return one item, at

0 commit comments

Comments
 (0)