Skip to content

Commit 405bec9

Browse files
Refactor quote selection to use pickFromArray for improved randomness
1 parent ea60dd5 commit 405bec9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sprint-3/quote-generator/quotes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ const quotes = [
493493
// call pickFromArray with the quotes array to check you get a random quote
494494

495495
function chooseQuote() {
496-
const randomQuote = quotes[Math.floor(Math.random() * quotes.length)];
496+
const randomQuote = pickFromArray(quotes)
497497

498498
const quote = document.getElementById("quote");
499499
quote.innerText = randomQuote.quote;

0 commit comments

Comments
 (0)