Skip to content

Commit ed23940

Browse files
committed
Changed randomQuote declaration,removed arrow function.
1 parent 12275cc commit ed23940

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

‎Sprint-3/quote-generator/quotes.js‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -496,16 +496,13 @@ const button = document.getElementById("new-quote");
496496

497497
// call pickFromArray with the quotes array to check you get a random quote
498498
function showRandomQuote() {
499-
let randomQuote = pickFromArray(quotes);
499+
const randomQuote = pickFromArray(quotes);
500500
updateUI(randomQuote);
501501
}
502502

503503
function updateUI(quoteObject) {
504504
quoteParagraph.innerText = quoteObject.quote;
505505
authorParagraph.innerText = quoteObject.author;
506506
}
507-
508-
button.addEventListener("click", () => {
509-
showRandomQuote();
510-
});
507+
button.addEventListener("click", showRandomQuote);
511508
showRandomQuote();

0 commit comments

Comments
 (0)