From 6b7247ff4c94d9dc789ef434829118783f91f7bf Mon Sep 17 00:00:00 2001 From: Maryanne Mosonik Date: Sat, 28 Mar 2026 00:21:49 +0300 Subject: [PATCH 1/2] Updated the HTML file --- Sprint-3/quote-generator/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index 30b434bcf..b5f285d12 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -3,11 +3,11 @@ - Title here + Quote Generator App -

hello there

+

Quote Generator

From faf58d570732a0747f20ba2b61d650e9fd0568b7 Mon Sep 17 00:00:00 2001 From: Maryanne Mosonik Date: Sat, 28 Mar 2026 00:57:00 +0300 Subject: [PATCH 2/2] Updated the quotes code --- Sprint-3/quote-generator/quotes.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 4a4d04b72..e83fb4a6f 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -491,3 +491,12 @@ const quotes = [ ]; // call pickFromArray with the quotes array to check you get a random quote + function getRandomQuote() { + const randomQuote = pickFromArray(quotes); + + document.getElementById("quote").textContent = randomQuote.quote; + document.getElementById("author").textContent = randomQuote.author; + } + getRandomQuote(); + + document.getElementById("new-quote").addEventListener("click", getRandomQuote); \ No newline at end of file