Skip to content

Commit 7d4e22a

Browse files
author
Arthur
committed
Variable name change
1 parent 6a30b97 commit 7d4e22a

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
@@ -25,13 +25,13 @@ function pickFromArray(quotes) {
2525
// First condition: When a person click the button, it should generate back a quote;
2626

2727
function updateWebpageWithQuote() {
28-
const elem = document.querySelector("#quote");
29-
const elem2 = document.querySelector("#author");
28+
const quoteDisplay = document.querySelector("#quote");
29+
const authorDisplay = document.querySelector("#author");
3030

3131
// store into the variable
32-
const elem3 = pickFromArray(quotes);
33-
elem.innerText = elem3.quote;
34-
elem2.innerText = elem3.author;
32+
const randomPick = pickFromArray(quotes);
33+
quoteDisplay.innerText = randomPick.quote;
34+
authorDisplay.innerText = randomPick.author;
3535
}
3636

3737
// Second condition: when a person enter the website, it should have a quote appear;

0 commit comments

Comments
 (0)