From 853119144b6ce03cda9180d081667e109fd1bd52 Mon Sep 17 00:00:00 2001 From: MattCarolus10 Date: Thu, 5 Nov 2026 23:12:38 +0000 Subject: [PATCH 01/20] object prep --- Sprint-2/prep/ordered-data.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Sprint-2/prep/ordered-data.js diff --git a/Sprint-2/prep/ordered-data.js b/Sprint-2/prep/ordered-data.js new file mode 100644 index 0000000000..016c7f9b25 --- /dev/null +++ b/Sprint-2/prep/ordered-data.js @@ -0,0 +1,18 @@ +// const profileData = { +// firstName: "Franceso", +// lastName: "Leoni", +// age: 33, +// } + +// // console.log(profileData.cityOfResidence); +// profileData.cityOfResidence = "Manchester" +// console.log(profileData.cityOfResidence); + +const object1 = { + firstName: "Franceso", + lastName: "Leoni", +} + +const object2 = {}; +object2.firstName = "Franceso"; +object2.lastName = "Leoni"; \ No newline at end of file From e06f169911e207c4adb1cef2c18578423f9f6cf4 Mon Sep 17 00:00:00 2001 From: MattCarolus10 Date: Thu, 12 Nov 2026 19:55:33 +0000 Subject: [PATCH 02/20] Add console log to test pickFromArray with quotes array --- Sprint-3/quote-generator/quotes.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 4a4d04b722..e233639747 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -490,4 +490,6 @@ const quotes = [ }, ]; +console.log(pickFromArray(quotes)); + // call pickFromArray with the quotes array to check you get a random quote From 7d614be6de3e82b0e0b946b75cfa6f23044f73f3 Mon Sep 17 00:00:00 2001 From: MattCarolus10 Date: Thu, 12 Nov 2026 19:55:43 +0000 Subject: [PATCH 03/20] Fix HTML doctype and update title for quote generator app --- 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 30b434bcfb..befe8788e2 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -1,9 +1,9 @@ - + - Title here + Quote generator app From aab75597174697d5588801138ef6a3bd3339cfbe Mon Sep 17 00:00:00 2001 From: MattCarolus10 Date: Thu, 12 Nov 2026 20:04:29 +0000 Subject: [PATCH 04/20] Display a random quote in the quote generator app --- Sprint-3/quote-generator/quotes.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index e233639747..a2293fd798 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -490,6 +490,7 @@ const quotes = [ }, ]; -console.log(pickFromArray(quotes)); +const selectedQuote = pickFromArray(quotes); +document.getElementById("quote").textContent = selectedQuote.quote; // call pickFromArray with the quotes array to check you get a random quote From faa4b4732133103a37c6c1879037471c5422c609 Mon Sep 17 00:00:00 2001 From: MattCarolus10 Date: Thu, 12 Nov 2026 20:07:25 +0000 Subject: [PATCH 05/20] Display author name alongside the selected quote in the quote generator app --- Sprint-3/quote-generator/quotes.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index a2293fd798..924ebe9352 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -492,5 +492,6 @@ const quotes = [ const selectedQuote = pickFromArray(quotes); document.getElementById("quote").textContent = selectedQuote.quote; +document.getElementById("author").textContent = selectedQuote.author; // call pickFromArray with the quotes array to check you get a random quote From fd0e8598a8c5a1fe759afb1ac38ded4897c55a49 Mon Sep 17 00:00:00 2001 From: MattCarolus10 Date: Thu, 12 Nov 2026 20:13:25 +0000 Subject: [PATCH 06/20] Refactor quote display logic into showQuote function --- Sprint-3/quote-generator/quotes.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 924ebe9352..914e24bb65 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -16,6 +16,7 @@ // pickFromArray(['a','b','c','d']) // maybe returns 'c' // You don't need to change this function + function pickFromArray(choices) { return choices[Math.floor(Math.random() * choices.length)]; } @@ -490,8 +491,11 @@ const quotes = [ }, ]; -const selectedQuote = pickFromArray(quotes); -document.getElementById("quote").textContent = selectedQuote.quote; -document.getElementById("author").textContent = selectedQuote.author; +function showQuote() { + const selectedQuote = pickFromArray(quotes); + document.getElementById("quote").textContent = selectedQuote.quote; + document.getElementById("author").textContent = selectedQuote.author; +} + // call pickFromArray with the quotes array to check you get a random quote From 9edde22639e9fcefba7f7b77ed4da6f5bd378dde Mon Sep 17 00:00:00 2001 From: MattCarolus10 Date: Thu, 12 Nov 2026 20:13:53 +0000 Subject: [PATCH 07/20] Call showQuote function to display a random quote and author --- Sprint-3/quote-generator/quotes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 914e24bb65..4a16ccc2f2 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -496,6 +496,6 @@ function showQuote() { document.getElementById("quote").textContent = selectedQuote.quote; document.getElementById("author").textContent = selectedQuote.author; } - +showQuote(); // call pickFromArray with the quotes array to check you get a random quote From 263334843cc584dfa9b700dd78e4d43e4ba13048 Mon Sep 17 00:00:00 2001 From: MattCarolus10 Date: Thu, 12 Nov 2026 20:20:01 +0000 Subject: [PATCH 08/20] Add event listener to generate a new quote on button click --- Sprint-3/quote-generator/quotes.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 4a16ccc2f2..b6beb5e589 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -498,4 +498,5 @@ function showQuote() { } showQuote(); +document.getElementById("new-quote").addEventListener("click", showQuote); // call pickFromArray with the quotes array to check you get a random quote From fee3a396436c55aac99e4c4311f1c3aab5fe1bcd Mon Sep 17 00:00:00 2001 From: MattCarolus10 Date: Thu, 12 Nov 2026 20:20:54 +0000 Subject: [PATCH 09/20] Add comment to verify random quote selection using pickFromArray --- Sprint-3/quote-generator/quotes.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index b6beb5e589..54dc18c141 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -499,4 +499,5 @@ function showQuote() { showQuote(); document.getElementById("new-quote").addEventListener("click", showQuote); + // call pickFromArray with the quotes array to check you get a random quote From 0cd676c6de6d2c747dd64bb18bbfbcae9b0bab32 Mon Sep 17 00:00:00 2001 From: MattCarolus10 Date: Thu, 12 Nov 2026 20:24:53 +0000 Subject: [PATCH 10/20] Add interval to automatically display a new quote every 5 seconds --- Sprint-3/quote-generator/quotes.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 54dc18c141..c9c90896f1 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -499,5 +499,7 @@ function showQuote() { showQuote(); document.getElementById("new-quote").addEventListener("click", showQuote); +setInterval(showQuote, 5000); + // call pickFromArray with the quotes array to check you get a random quote From a7959495ffff160b20c991b0c99629de3bd49e40 Mon Sep 17 00:00:00 2001 From: MattCarolus10 Date: Thu, 12 Nov 2026 21:36:41 +0000 Subject: [PATCH 11/20] Remove prep from quote generator branch --- Sprint-2/prep/ordered-data.js | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 Sprint-2/prep/ordered-data.js diff --git a/Sprint-2/prep/ordered-data.js b/Sprint-2/prep/ordered-data.js deleted file mode 100644 index 016c7f9b25..0000000000 --- a/Sprint-2/prep/ordered-data.js +++ /dev/null @@ -1,18 +0,0 @@ -// const profileData = { -// firstName: "Franceso", -// lastName: "Leoni", -// age: 33, -// } - -// // console.log(profileData.cityOfResidence); -// profileData.cityOfResidence = "Manchester" -// console.log(profileData.cityOfResidence); - -const object1 = { - firstName: "Franceso", - lastName: "Leoni", -} - -const object2 = {}; -object2.firstName = "Franceso"; -object2.lastName = "Leoni"; \ No newline at end of file From f283787e76a2f68d5a0ddfcdfdc2b5f8c0031eb2 Mon Sep 17 00:00:00 2001 From: MattCarolus10 Date: Mon, 16 Nov 2026 21:58:09 +0000 Subject: [PATCH 12/20] Remove redundant setInterval call for showQuote function --- Sprint-3/quote-generator/quotes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index c9c90896f1..194594be4a 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -499,7 +499,7 @@ function showQuote() { showQuote(); document.getElementById("new-quote").addEventListener("click", showQuote); -setInterval(showQuote, 5000); + // call pickFromArray with the quotes array to check you get a random quote From 05604a05538a272201c2be1aecf51b5cf328ae83 Mon Sep 17 00:00:00 2001 From: MattCarolus10 Date: Mon, 16 Nov 2026 22:00:20 +0000 Subject: [PATCH 13/20] Add autoplay button to trigger automatic quote display --- Sprint-3/quote-generator/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index befe8788e2..5fedcbaac2 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -11,5 +11,6 @@

hello there

+ From 209493aa704657a4895b96697b7aa283ceac373f Mon Sep 17 00:00:00 2001 From: MattCarolus10 Date: Mon, 16 Nov 2026 22:06:54 +0000 Subject: [PATCH 14/20] Fix event listener for new quote button in showQuote function --- Sprint-3/quote-generator/quotes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 194594be4a..8b4d6d4511 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -499,7 +499,7 @@ function showQuote() { showQuote(); document.getElementById("new-quote").addEventListener("click", showQuote); - +document.getElementById("new quote").addElementListener("click", showQuote); // call pickFromArray with the quotes array to check you get a random quote From 2e220bab3579badcfe4a69257764510d0bd8b1eb Mon Sep 17 00:00:00 2001 From: MattCarolus10 Date: Mon, 16 Nov 2026 22:14:15 +0000 Subject: [PATCH 15/20] Add character limit section and fix event listener for autoplay button --- Sprint-3/prep/index.html | 24 ++++++++++++++++++++++++ Sprint-3/quote-generator/quotes.js | 4 +++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 Sprint-3/prep/index.html diff --git a/Sprint-3/prep/index.html b/Sprint-3/prep/index.html new file mode 100644 index 0000000000..7f31208ecc --- /dev/null +++ b/Sprint-3/prep/index.html @@ -0,0 +1,24 @@ + + + + + + Document + + + +
+

Character limit

+ + +

You have 200 characters remaining

+
+ + \ No newline at end of file diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 8b4d6d4511..e2dbbdb85b 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -499,7 +499,9 @@ function showQuote() { showQuote(); document.getElementById("new-quote").addEventListener("click", showQuote); -document.getElementById("new quote").addElementListener("click", showQuote); +document.getElementById("autoplay").addEventListening("click", () => { + setInterval(showQuote, 5000); +}, {once: true}); // call pickFromArray with the quotes array to check you get a random quote From efc6f755a36d5b0536bda5f7e820c260240a1fb4 Mon Sep 17 00:00:00 2001 From: MattCarolus10 Date: Mon, 16 Nov 2026 22:15:07 +0000 Subject: [PATCH 16/20] Fix typo in event listener for autoplay button --- Sprint-3/quote-generator/quotes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index e2dbbdb85b..d56a59a0d1 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -499,7 +499,7 @@ function showQuote() { showQuote(); document.getElementById("new-quote").addEventListener("click", showQuote); -document.getElementById("autoplay").addEventListening("click", () => { +document.getElementById("autoplay").addEventListener("click", () => { setInterval(showQuote, 5000); }, {once: true}); From d60a4412a697a9c60c392e0fe662d467f0881a21 Mon Sep 17 00:00:00 2001 From: MattCarolus10 Date: Mon, 16 Nov 2026 22:15:47 +0000 Subject: [PATCH 17/20] Refactor autoplay button event listener for improved readability --- Sprint-3/quote-generator/quotes.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index d56a59a0d1..1a32cf2f22 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -499,9 +499,12 @@ function showQuote() { showQuote(); document.getElementById("new-quote").addEventListener("click", showQuote); -document.getElementById("autoplay").addEventListener("click", () => { - setInterval(showQuote, 5000); -}, {once: true}); - +document.getElementById("autoplay").addEventListener( + "click", + () => { + setInterval(showQuote, 5000); + }, + { once: true } +); // call pickFromArray with the quotes array to check you get a random quote From 2cd5000061f52603a930a34a14ed8c129e2cb344 Mon Sep 17 00:00:00 2001 From: MattCarolus10 Date: Mon, 16 Nov 2026 22:25:34 +0000 Subject: [PATCH 18/20] Remove unrelated prep file --- Sprint-3/prep/index.html | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 Sprint-3/prep/index.html diff --git a/Sprint-3/prep/index.html b/Sprint-3/prep/index.html deleted file mode 100644 index 7f31208ecc..0000000000 --- a/Sprint-3/prep/index.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - Document - - - -
-

Character limit

- - -

You have 200 characters remaining

-
- - \ No newline at end of file From db72b5483ebef041eb9f94af134dadfc4698ed3f Mon Sep 17 00:00:00 2001 From: MattCarolus10 Date: Sat, 21 Nov 2026 15:27:05 +0000 Subject: [PATCH 19/20] Add auto-play status paragraph to index.html --- Sprint-3/quote-generator/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/Sprint-3/quote-generator/index.html b/Sprint-3/quote-generator/index.html index 5fedcbaac2..f3f3bdd363 100644 --- a/Sprint-3/quote-generator/index.html +++ b/Sprint-3/quote-generator/index.html @@ -12,5 +12,6 @@

hello there

+

Auto-play: Off

From 96307ca83f3e64373cbbf66c236d4cf47ca5ba5d Mon Sep 17 00:00:00 2001 From: MattCarolus10 Date: Sat, 21 Nov 2026 15:27:10 +0000 Subject: [PATCH 20/20] Implement toggle functionality for autoplay feature with status update --- Sprint-3/quote-generator/quotes.js | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/Sprint-3/quote-generator/quotes.js b/Sprint-3/quote-generator/quotes.js index 1a32cf2f22..434f8ccb80 100644 --- a/Sprint-3/quote-generator/quotes.js +++ b/Sprint-3/quote-generator/quotes.js @@ -498,13 +498,22 @@ function showQuote() { } showQuote(); -document.getElementById("new-quote").addEventListener("click", showQuote); -document.getElementById("autoplay").addEventListener( - "click", - () => { - setInterval(showQuote, 5000); - }, - { once: true } -); +let autoplayTimer = null; + +const autoplayButton = document.getElementById("autoplay"); +const autoplayStatus = document.getElementById("auto-play-status"); + +autoplayButton.addEventListener("click", () => { + if (autoplayTimer === null) { + autoplayTimer = setInterval(showQuote, 5000); + autoplayButton.textContent = "Stop autoplay"; + autoplayStatus.textContent = "Auto-play: On"; + } else { + clearInterval(autoplayTimer); + autoplayTimer = null; + autoplayButton.textContent = "Start autoplay"; + autoplayStatus.textContent = "Auto-play: Off"; + } +}); // call pickFromArray with the quotes array to check you get a random quote