From c36e8eedef0ad7cd37fdf41f7d824997ce9a760b Mon Sep 17 00:00:00 2001 From: russom Date: Wed, 5 Aug 2026 00:16:48 +0100 Subject: [PATCH 01/30] Parameter to the function updated with the object properties. --- Sprint-1/destructuring/exercise-1/exercise.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-1/destructuring/exercise-1/exercise.js b/Sprint-1/destructuring/exercise-1/exercise.js index 1ff2ac5c..d86bc7bf 100644 --- a/Sprint-1/destructuring/exercise-1/exercise.js +++ b/Sprint-1/destructuring/exercise-1/exercise.js @@ -6,7 +6,7 @@ const personOne = { // Update the parameter to this function to make it work. // Don't change anything else. -function introduceYourself(___________________________) { +function introduceYourself({ name, age, favouriteFood }) { console.log( `Hello, my name is ${name}. I am ${age} years old and my favourite food is ${favouriteFood}.` ); From 8bd864d06c3b806d06c516ce0262ea1617bf3b25 Mon Sep 17 00:00:00 2001 From: russom Date: Wed, 5 Aug 2026 22:56:39 +0100 Subject: [PATCH 02/30] Function created for displaying first and last name. --- Sprint-1/destructuring/exercise-2/exercise.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Sprint-1/destructuring/exercise-2/exercise.js b/Sprint-1/destructuring/exercise-2/exercise.js index e11b75eb..7db6509f 100644 --- a/Sprint-1/destructuring/exercise-2/exercise.js +++ b/Sprint-1/destructuring/exercise-2/exercise.js @@ -70,3 +70,14 @@ let hogwarts = [ occupation: "Teacher", }, ]; + +function displayGryffindor(hogwarts) { + const people = hogwarts.filter(({ house }) => house === "Gryffindor"); + people.forEach(({ firstName, lastName }) => { + console.log(`${firstName} ${lastName}`); + }); +} + + +displayGryffindor(hogwarts); + From b558fcc9fa337d723fefdc0e2da9e9cf284217fe Mon Sep 17 00:00:00 2001 From: russom Date: Wed, 5 Aug 2026 22:57:32 +0100 Subject: [PATCH 03/30] Comment added explaining what method is used. --- Sprint-1/destructuring/exercise-1/exercise.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-1/destructuring/exercise-1/exercise.js b/Sprint-1/destructuring/exercise-1/exercise.js index d86bc7bf..8a4d9066 100644 --- a/Sprint-1/destructuring/exercise-1/exercise.js +++ b/Sprint-1/destructuring/exercise-1/exercise.js @@ -6,7 +6,7 @@ const personOne = { // Update the parameter to this function to make it work. // Don't change anything else. -function introduceYourself({ name, age, favouriteFood }) { +function introduceYourself({ name, age, favouriteFood }) { // Object destructuring in function parameters. console.log( `Hello, my name is ${name}. I am ${age} years old and my favourite food is ${favouriteFood}.` ); From 4ae7b33d12369670d9d2056cac3f3bf193b337d5 Mon Sep 17 00:00:00 2001 From: russom Date: Wed, 5 Aug 2026 23:19:49 +0100 Subject: [PATCH 04/30] pet !== null added to filter teachers with pets --- Sprint-1/destructuring/exercise-2/exercise.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Sprint-1/destructuring/exercise-2/exercise.js b/Sprint-1/destructuring/exercise-2/exercise.js index 7db6509f..5404031c 100644 --- a/Sprint-1/destructuring/exercise-2/exercise.js +++ b/Sprint-1/destructuring/exercise-2/exercise.js @@ -74,10 +74,19 @@ let hogwarts = [ function displayGryffindor(hogwarts) { const people = hogwarts.filter(({ house }) => house === "Gryffindor"); people.forEach(({ firstName, lastName }) => { - console.log(`${firstName} ${lastName}`); + console.log(`${firstName} ${lastName}`); }); } - displayGryffindor(hogwarts); +function displayTeacherWithPets(hogwarts) { + const teachers = hogwarts.filter( + ({ occupation, pet }) => occupation === "Teacher" && pet !== null + ); + teachers.forEach(({ firstName, lastName }) => { + console.log(`${firstName} ${lastName}`); + }); +} + +displayTeacherWithPets(hogwarts); From abbcf09aaa42b8bd4a7795a2934bd2ccca50ddc8 Mon Sep 17 00:00:00 2001 From: russom Date: Wed, 5 Aug 2026 23:20:56 +0100 Subject: [PATCH 05/30] Function names updated. --- Sprint-1/destructuring/exercise-2/exercise.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sprint-1/destructuring/exercise-2/exercise.js b/Sprint-1/destructuring/exercise-2/exercise.js index 5404031c..2a8bb96a 100644 --- a/Sprint-1/destructuring/exercise-2/exercise.js +++ b/Sprint-1/destructuring/exercise-2/exercise.js @@ -80,7 +80,7 @@ function displayGryffindor(hogwarts) { displayGryffindor(hogwarts); -function displayTeacherWithPets(hogwarts) { +function displayTeachers(hogwarts) { const teachers = hogwarts.filter( ({ occupation, pet }) => occupation === "Teacher" && pet !== null ); @@ -89,4 +89,4 @@ function displayTeacherWithPets(hogwarts) { }); } -displayTeacherWithPets(hogwarts); +displayTeachers(hogwarts); From 828f30b57a0ff5a0f901688e6fcbfb6e20297ebf Mon Sep 17 00:00:00 2001 From: russom Date: Wed, 5 Aug 2026 23:21:29 +0100 Subject: [PATCH 06/30] Empty space deleted --- Sprint-1/destructuring/exercise-1/exercise.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-1/destructuring/exercise-1/exercise.js b/Sprint-1/destructuring/exercise-1/exercise.js index 8a4d9066..00498fc4 100644 --- a/Sprint-1/destructuring/exercise-1/exercise.js +++ b/Sprint-1/destructuring/exercise-1/exercise.js @@ -12,4 +12,4 @@ function introduceYourself({ name, age, favouriteFood }) { // Object destructuri ); } -introduceYourself(personOne); +introduceYourself(personOne); \ No newline at end of file From 21524fb0f26b02057cb4966ef71a731db1d7599f Mon Sep 17 00:00:00 2001 From: russom Date: Thu, 6 Aug 2026 12:34:14 +0100 Subject: [PATCH 07/30] Log items logged with no formatting first --- Sprint-1/destructuring/exercise-3/exercise.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Sprint-1/destructuring/exercise-3/exercise.js b/Sprint-1/destructuring/exercise-3/exercise.js index b3a36f4e..93984ac9 100644 --- a/Sprint-1/destructuring/exercise-3/exercise.js +++ b/Sprint-1/destructuring/exercise-3/exercise.js @@ -6,3 +6,14 @@ let order = [ { itemName: "Hot Coffee", quantity: 2, unitPricePence: 100 }, { itemName: "Hash Brown", quantity: 4, unitPricePence: 40 }, ]; + +function printReceipt(order) { + order.forEach(({ quantity, itemName, unitPricePence }) => { + console.log(`${quantity} ${itemName} ${unitPricePence}`); + }); +} + +printReceipt(order); +// 1. Log each item quantity and name. +// 2. Log total cost. +// 3. \ No newline at end of file From 5320ca4cf465a8461d85102401eada6835078ca8 Mon Sep 17 00:00:00 2001 From: russom Date: Thu, 6 Aug 2026 12:55:47 +0100 Subject: [PATCH 08/30] Receipt heading QTY, ITEM and TOTAL created --- Sprint-1/destructuring/exercise-3/exercise.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sprint-1/destructuring/exercise-3/exercise.js b/Sprint-1/destructuring/exercise-3/exercise.js index 93984ac9..b6eb75ba 100644 --- a/Sprint-1/destructuring/exercise-3/exercise.js +++ b/Sprint-1/destructuring/exercise-3/exercise.js @@ -8,6 +8,8 @@ let order = [ ]; function printReceipt(order) { + let total = 0; + console.log("QTY ITEM TOTAL"); order.forEach(({ quantity, itemName, unitPricePence }) => { console.log(`${quantity} ${itemName} ${unitPricePence}`); }); From 76b7b021beee30830805d86dcca1752fd90e6403 Mon Sep 17 00:00:00 2001 From: russom Date: Thu, 6 Aug 2026 13:02:23 +0100 Subject: [PATCH 09/30] Item price total and final total calculated --- Sprint-1/destructuring/exercise-3/exercise.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sprint-1/destructuring/exercise-3/exercise.js b/Sprint-1/destructuring/exercise-3/exercise.js index b6eb75ba..d3734c1c 100644 --- a/Sprint-1/destructuring/exercise-3/exercise.js +++ b/Sprint-1/destructuring/exercise-3/exercise.js @@ -11,6 +11,9 @@ function printReceipt(order) { let total = 0; console.log("QTY ITEM TOTAL"); order.forEach(({ quantity, itemName, unitPricePence }) => { + let itemTotal = quantity * unitPricePence; + total = total + itemTotal; + let priceInPounds = itemTotal / 100; console.log(`${quantity} ${itemName} ${unitPricePence}`); }); } From e0f84c2c54e2fec35b703b9826b695911d1ec490 Mon Sep 17 00:00:00 2001 From: russom Date: Thu, 6 Aug 2026 13:42:14 +0100 Subject: [PATCH 10/30] Formatting: add spaces to match the requirement --- Sprint-1/destructuring/exercise-3/exercise.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Sprint-1/destructuring/exercise-3/exercise.js b/Sprint-1/destructuring/exercise-3/exercise.js index d3734c1c..ff701b8c 100644 --- a/Sprint-1/destructuring/exercise-3/exercise.js +++ b/Sprint-1/destructuring/exercise-3/exercise.js @@ -9,16 +9,28 @@ let order = [ function printReceipt(order) { let total = 0; - console.log("QTY ITEM TOTAL"); + + console.log("QTY".padEnd(8) + "ITEM".padEnd(22) + "TOTAL"); + order.forEach(({ quantity, itemName, unitPricePence }) => { + let itemTotal = quantity * unitPricePence; + total = total + itemTotal; + let priceInPounds = itemTotal / 100; - console.log(`${quantity} ${itemName} ${unitPricePence}`); + + console.log( + quantity.toString().padEnd(8) + + itemName.padEnd(22) + + priceInPounds.toFixed(2) + ); }); + + console.log("\nTotal: " + (total / 100).toFixed(2)); } printReceipt(order); // 1. Log each item quantity and name. // 2. Log total cost. -// 3. \ No newline at end of file +// 3. From 379c91afe4cec9ba3c70504431972d70946c4028 Mon Sep 17 00:00:00 2001 From: russom Date: Thu, 6 Aug 2026 14:47:05 +0100 Subject: [PATCH 11/30] Comments: remove irrelevant comments. --- Sprint-1/destructuring/exercise-3/exercise.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Sprint-1/destructuring/exercise-3/exercise.js b/Sprint-1/destructuring/exercise-3/exercise.js index ff701b8c..080a8b95 100644 --- a/Sprint-1/destructuring/exercise-3/exercise.js +++ b/Sprint-1/destructuring/exercise-3/exercise.js @@ -11,15 +11,14 @@ function printReceipt(order) { let total = 0; console.log("QTY".padEnd(8) + "ITEM".padEnd(22) + "TOTAL"); - + order.forEach(({ quantity, itemName, unitPricePence }) => { - let itemTotal = quantity * unitPricePence; - + total = total + itemTotal; - + let priceInPounds = itemTotal / 100; - + console.log( quantity.toString().padEnd(8) + itemName.padEnd(22) + @@ -31,6 +30,3 @@ function printReceipt(order) { } printReceipt(order); -// 1. Log each item quantity and name. -// 2. Log total cost. -// 3. From eaedbd1241c06d876596535679ecc184420ee68c Mon Sep 17 00:00:00 2001 From: russom Date: Thu, 6 Aug 2026 14:55:53 +0100 Subject: [PATCH 12/30] Function names updated with meaningful names --- Sprint-1/destructuring/exercise-2/exercise.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sprint-1/destructuring/exercise-2/exercise.js b/Sprint-1/destructuring/exercise-2/exercise.js index 2a8bb96a..6ba2d356 100644 --- a/Sprint-1/destructuring/exercise-2/exercise.js +++ b/Sprint-1/destructuring/exercise-2/exercise.js @@ -71,16 +71,16 @@ let hogwarts = [ }, ]; -function displayGryffindor(hogwarts) { +function getGryffindorMembers(hogwarts) { const people = hogwarts.filter(({ house }) => house === "Gryffindor"); people.forEach(({ firstName, lastName }) => { console.log(`${firstName} ${lastName}`); }); } -displayGryffindor(hogwarts); +getGryffindorMembers(hogwarts); -function displayTeachers(hogwarts) { +function getTeachersWithPets(hogwarts) { const teachers = hogwarts.filter( ({ occupation, pet }) => occupation === "Teacher" && pet !== null ); @@ -89,4 +89,4 @@ function displayTeachers(hogwarts) { }); } -displayTeachers(hogwarts); +getTeachersWithPets(hogwarts); From c98ec55d506e2a9786d478aac35feca41a9094b1 Mon Sep 17 00:00:00 2001 From: russom Date: Thu, 6 Aug 2026 15:04:31 +0100 Subject: [PATCH 13/30] Formatting: add separating space between task 1 and 2 log print outs to --- Sprint-1/destructuring/exercise-2/exercise.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sprint-1/destructuring/exercise-2/exercise.js b/Sprint-1/destructuring/exercise-2/exercise.js index 6ba2d356..99353b4c 100644 --- a/Sprint-1/destructuring/exercise-2/exercise.js +++ b/Sprint-1/destructuring/exercise-2/exercise.js @@ -78,8 +78,6 @@ function getGryffindorMembers(hogwarts) { }); } -getGryffindorMembers(hogwarts); - function getTeachersWithPets(hogwarts) { const teachers = hogwarts.filter( ({ occupation, pet }) => occupation === "Teacher" && pet !== null @@ -88,5 +86,8 @@ function getTeachersWithPets(hogwarts) { console.log(`${firstName} ${lastName}`); }); } +getGryffindorMembers(hogwarts); + +console.log(); getTeachersWithPets(hogwarts); From 5bab8f7c8b2dc77698192767acc69a974e2184b2 Mon Sep 17 00:00:00 2001 From: russom Date: Sun, 16 Aug 2026 15:47:52 +0100 Subject: [PATCH 14/30] bug: add missing bracket on line 57 --- debugging/book-library/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debugging/book-library/script.js b/debugging/book-library/script.js index 75ce6c1d..eed706fd 100644 --- a/debugging/book-library/script.js +++ b/debugging/book-library/script.js @@ -54,7 +54,7 @@ function render() { let table = document.getElementById("display"); let rowsNumber = table.rows.length; //delete old table - for (let n = rowsNumber - 1; n > 0; n-- { + for (let n = rowsNumber - 1; n > 0; n--) { table.deleteRow(n); } //insert updated row and cells From ce972dd652621ef948ad997795081809247583a9 Mon Sep 17 00:00:00 2001 From: russom Date: Mon, 17 Aug 2026 12:40:07 +0100 Subject: [PATCH 15/30] fix bugs and refactor code --- debugging/book-library/script.js | 33 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/debugging/book-library/script.js b/debugging/book-library/script.js index eed706fd..c0afef78 100644 --- a/debugging/book-library/script.js +++ b/debugging/book-library/script.js @@ -16,7 +16,6 @@ function populateStorage() { ); myLibrary.push(book1); myLibrary.push(book2); - render(); } } @@ -28,17 +27,12 @@ const check = document.getElementById("check"); //check the right input from forms and if its ok -> add the new book (object in array) //via Book function and start render function function submit() { - if ( - title.value == null || - title.value == "" || - pages.value == null || - pages.value == "" - ) { + if (title.value == "" || author.value == "" || pages.value == "") { alert("Please fill all fields!"); return false; } else { - let book = new Book(title.value, title.value, pages.value, check.checked); - library.push(book); + let book = new Book(title.value, author.value, pages.value, check.checked); + myLibrary.push(book); render(); } } @@ -59,8 +53,10 @@ function render() { } //insert updated row and cells let length = myLibrary.length; + for (let i = 0; i < length; i++) { - let row = table.insertRow(1); + let row = table.insertRow(); + let titleCell = row.insertCell(0); let authorCell = row.insertCell(1); let pagesCell = row.insertCell(2); @@ -72,14 +68,14 @@ function render() { //add and wait for action for read/unread button let changeBut = document.createElement("button"); - changeBut.id = i; + changeBut.className = "btn btn-success"; wasReadCell.appendChild(changeBut); let readStatus = ""; if (myLibrary[i].check == false) { - readStatus = "Yes"; - } else { readStatus = "No"; + } else { + readStatus = "Yes"; } changeBut.innerText = readStatus; @@ -90,11 +86,12 @@ function render() { //add delete button to every row and render again let delButton = document.createElement("button"); - delBut.id = i + 5; - deleteCell.appendChild(delBut); - delBut.className = "btn btn-warning"; - delBut.innerHTML = "Delete"; - delBut.addEventListener("clicks", function () { + + deleteCell.appendChild(delButton); + delButton.className = "btn btn-warning"; + delButton.innerHTML = "Delete"; + + delButton.addEventListener("click", function () { alert(`You've deleted title: ${myLibrary[i].title}`); myLibrary.splice(i, 1); render(); From 062e71fb72239c1531b5163697c2e0936f68af17 Mon Sep 17 00:00:00 2001 From: russom Date: Mon, 17 Aug 2026 13:37:00 +0100 Subject: [PATCH 16/30] fix: update table row with index 1 --- debugging/book-library/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debugging/book-library/script.js b/debugging/book-library/script.js index c0afef78..f4dd4e83 100644 --- a/debugging/book-library/script.js +++ b/debugging/book-library/script.js @@ -55,7 +55,7 @@ function render() { let length = myLibrary.length; for (let i = 0; i < length; i++) { - let row = table.insertRow(); + let row = table.insertRow(1); let titleCell = row.insertCell(0); let authorCell = row.insertCell(1); From 688c8adddd78d284c5f3e6d1394486f121513240 Mon Sep 17 00:00:00 2001 From: russom Date: Mon, 17 Aug 2026 13:49:41 +0100 Subject: [PATCH 17/30] Remove accidentally committed file git status# --- debugging/book-library/script.js | 100 ------------------------------- 1 file changed, 100 deletions(-) delete mode 100644 debugging/book-library/script.js diff --git a/debugging/book-library/script.js b/debugging/book-library/script.js deleted file mode 100644 index f4dd4e83..00000000 --- a/debugging/book-library/script.js +++ /dev/null @@ -1,100 +0,0 @@ -let myLibrary = []; - -window.addEventListener("load", function (e) { - populateStorage(); - render(); -}); - -function populateStorage() { - if (myLibrary.length == 0) { - let book1 = new Book("Robison Crusoe", "Daniel Defoe", "252", true); - let book2 = new Book( - "The Old Man and the Sea", - "Ernest Hemingway", - "127", - true - ); - myLibrary.push(book1); - myLibrary.push(book2); - } -} - -const title = document.getElementById("title"); -const author = document.getElementById("author"); -const pages = document.getElementById("pages"); -const check = document.getElementById("check"); - -//check the right input from forms and if its ok -> add the new book (object in array) -//via Book function and start render function -function submit() { - if (title.value == "" || author.value == "" || pages.value == "") { - alert("Please fill all fields!"); - return false; - } else { - let book = new Book(title.value, author.value, pages.value, check.checked); - myLibrary.push(book); - render(); - } -} - -function Book(title, author, pages, check) { - this.title = title; - this.author = author; - this.pages = pages; - this.check = check; -} - -function render() { - let table = document.getElementById("display"); - let rowsNumber = table.rows.length; - //delete old table - for (let n = rowsNumber - 1; n > 0; n--) { - table.deleteRow(n); - } - //insert updated row and cells - let length = myLibrary.length; - - for (let i = 0; i < length; i++) { - let row = table.insertRow(1); - - let titleCell = row.insertCell(0); - let authorCell = row.insertCell(1); - let pagesCell = row.insertCell(2); - let wasReadCell = row.insertCell(3); - let deleteCell = row.insertCell(4); - titleCell.innerHTML = myLibrary[i].title; - authorCell.innerHTML = myLibrary[i].author; - pagesCell.innerHTML = myLibrary[i].pages; - - //add and wait for action for read/unread button - let changeBut = document.createElement("button"); - - changeBut.className = "btn btn-success"; - wasReadCell.appendChild(changeBut); - let readStatus = ""; - if (myLibrary[i].check == false) { - readStatus = "No"; - } else { - readStatus = "Yes"; - } - changeBut.innerText = readStatus; - - changeBut.addEventListener("click", function () { - myLibrary[i].check = !myLibrary[i].check; - render(); - }); - - //add delete button to every row and render again - let delButton = document.createElement("button"); - - deleteCell.appendChild(delButton); - delButton.className = "btn btn-warning"; - delButton.innerHTML = "Delete"; - - delButton.addEventListener("click", function () { - alert(`You've deleted title: ${myLibrary[i].title}`); - myLibrary.splice(i, 1); - render(); - }); - } -} From 2bf15a0dfc70472b90d8be8b6bae7868586f0fe8 Mon Sep 17 00:00:00 2001 From: russom Date: Mon, 17 Aug 2026 13:51:36 +0100 Subject: [PATCH 18/30] Remove accidentally committed file --- debugging/book-library/script.js | 100 +++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 debugging/book-library/script.js diff --git a/debugging/book-library/script.js b/debugging/book-library/script.js new file mode 100644 index 00000000..f4dd4e83 --- /dev/null +++ b/debugging/book-library/script.js @@ -0,0 +1,100 @@ +let myLibrary = []; + +window.addEventListener("load", function (e) { + populateStorage(); + render(); +}); + +function populateStorage() { + if (myLibrary.length == 0) { + let book1 = new Book("Robison Crusoe", "Daniel Defoe", "252", true); + let book2 = new Book( + "The Old Man and the Sea", + "Ernest Hemingway", + "127", + true + ); + myLibrary.push(book1); + myLibrary.push(book2); + } +} + +const title = document.getElementById("title"); +const author = document.getElementById("author"); +const pages = document.getElementById("pages"); +const check = document.getElementById("check"); + +//check the right input from forms and if its ok -> add the new book (object in array) +//via Book function and start render function +function submit() { + if (title.value == "" || author.value == "" || pages.value == "") { + alert("Please fill all fields!"); + return false; + } else { + let book = new Book(title.value, author.value, pages.value, check.checked); + myLibrary.push(book); + render(); + } +} + +function Book(title, author, pages, check) { + this.title = title; + this.author = author; + this.pages = pages; + this.check = check; +} + +function render() { + let table = document.getElementById("display"); + let rowsNumber = table.rows.length; + //delete old table + for (let n = rowsNumber - 1; n > 0; n--) { + table.deleteRow(n); + } + //insert updated row and cells + let length = myLibrary.length; + + for (let i = 0; i < length; i++) { + let row = table.insertRow(1); + + let titleCell = row.insertCell(0); + let authorCell = row.insertCell(1); + let pagesCell = row.insertCell(2); + let wasReadCell = row.insertCell(3); + let deleteCell = row.insertCell(4); + titleCell.innerHTML = myLibrary[i].title; + authorCell.innerHTML = myLibrary[i].author; + pagesCell.innerHTML = myLibrary[i].pages; + + //add and wait for action for read/unread button + let changeBut = document.createElement("button"); + + changeBut.className = "btn btn-success"; + wasReadCell.appendChild(changeBut); + let readStatus = ""; + if (myLibrary[i].check == false) { + readStatus = "No"; + } else { + readStatus = "Yes"; + } + changeBut.innerText = readStatus; + + changeBut.addEventListener("click", function () { + myLibrary[i].check = !myLibrary[i].check; + render(); + }); + + //add delete button to every row and render again + let delButton = document.createElement("button"); + + deleteCell.appendChild(delButton); + delButton.className = "btn btn-warning"; + delButton.innerHTML = "Delete"; + + delButton.addEventListener("click", function () { + alert(`You've deleted title: ${myLibrary[i].title}`); + myLibrary.splice(i, 1); + render(); + }); + } +} From fe61651af8e3e964d6fd5027db2121ed281bcf1d Mon Sep 17 00:00:00 2001 From: russom Date: Mon, 17 Aug 2026 13:59:54 +0100 Subject: [PATCH 19/30] Remove destructuring exercise files --- Sprint-1/destructuring/exercise-1/exercise.js | 15 --- Sprint-1/destructuring/exercise-2/exercise.js | 93 ------------------- Sprint-1/destructuring/exercise-3/exercise.js | 32 ------- 3 files changed, 140 deletions(-) delete mode 100644 Sprint-1/destructuring/exercise-1/exercise.js delete mode 100644 Sprint-1/destructuring/exercise-2/exercise.js delete mode 100644 Sprint-1/destructuring/exercise-3/exercise.js diff --git a/Sprint-1/destructuring/exercise-1/exercise.js b/Sprint-1/destructuring/exercise-1/exercise.js deleted file mode 100644 index 00498fc4..00000000 --- a/Sprint-1/destructuring/exercise-1/exercise.js +++ /dev/null @@ -1,15 +0,0 @@ -const personOne = { - name: "Popeye", - age: 34, - favouriteFood: "Spinach", -}; - -// Update the parameter to this function to make it work. -// Don't change anything else. -function introduceYourself({ name, age, favouriteFood }) { // Object destructuring in function parameters. - console.log( - `Hello, my name is ${name}. I am ${age} years old and my favourite food is ${favouriteFood}.` - ); -} - -introduceYourself(personOne); \ No newline at end of file diff --git a/Sprint-1/destructuring/exercise-2/exercise.js b/Sprint-1/destructuring/exercise-2/exercise.js deleted file mode 100644 index 99353b4c..00000000 --- a/Sprint-1/destructuring/exercise-2/exercise.js +++ /dev/null @@ -1,93 +0,0 @@ -let hogwarts = [ - { - firstName: "Harry", - lastName: "Potter", - house: "Gryffindor", - pet: "Owl", - occupation: "Student", - }, - { - firstName: "Ron", - lastName: "Weasley", - house: "Gryffindor", - pet: "Scabbers", - occupation: "Student", - }, - { - firstName: "Hermione", - lastName: "Granger", - house: "Gryffindor", - pet: "Cat", - occupation: "Student", - }, - { - firstName: "Draco", - lastName: "Malfoy", - house: "Slytherin", - pet: null, - occupation: "Student", - }, - { - firstName: "Cedric", - lastName: "Diggory", - house: "HufflePuff", - pet: null, - occupation: "Student", - }, - { - firstName: "Severus", - lastName: "Snape", - house: "Slytherin", - pet: null, - occupation: "Teacher", - }, - { - firstName: "Filius", - lastName: "Flitwick", - house: "Ravenclaw", - pet: null, - occupation: "Teacher", - }, - { - firstName: "Pomona", - lastName: "Sprout", - house: "Hufflepuff", - pet: null, - occupation: "Teacher", - }, - { - firstName: "Minerva", - lastName: "McGonagall", - house: "Gryffindor", - pet: null, - occupation: "Teacher", - }, - { - firstName: "Albus", - lastName: "Dumbledore", - house: "Gryffindor", - pet: "Phoenix", - occupation: "Teacher", - }, -]; - -function getGryffindorMembers(hogwarts) { - const people = hogwarts.filter(({ house }) => house === "Gryffindor"); - people.forEach(({ firstName, lastName }) => { - console.log(`${firstName} ${lastName}`); - }); -} - -function getTeachersWithPets(hogwarts) { - const teachers = hogwarts.filter( - ({ occupation, pet }) => occupation === "Teacher" && pet !== null - ); - teachers.forEach(({ firstName, lastName }) => { - console.log(`${firstName} ${lastName}`); - }); -} -getGryffindorMembers(hogwarts); - -console.log(); - -getTeachersWithPets(hogwarts); diff --git a/Sprint-1/destructuring/exercise-3/exercise.js b/Sprint-1/destructuring/exercise-3/exercise.js deleted file mode 100644 index 080a8b95..00000000 --- a/Sprint-1/destructuring/exercise-3/exercise.js +++ /dev/null @@ -1,32 +0,0 @@ -let order = [ - { itemName: "Hot cakes", quantity: 1, unitPricePence: 232 }, - { itemName: "Apple Pie", quantity: 2, unitPricePence: 139 }, - { itemName: "Egg McMuffin", quantity: 1, unitPricePence: 280 }, - { itemName: "Sausage McMuffin", quantity: 1, unitPricePence: 300 }, - { itemName: "Hot Coffee", quantity: 2, unitPricePence: 100 }, - { itemName: "Hash Brown", quantity: 4, unitPricePence: 40 }, -]; - -function printReceipt(order) { - let total = 0; - - console.log("QTY".padEnd(8) + "ITEM".padEnd(22) + "TOTAL"); - - order.forEach(({ quantity, itemName, unitPricePence }) => { - let itemTotal = quantity * unitPricePence; - - total = total + itemTotal; - - let priceInPounds = itemTotal / 100; - - console.log( - quantity.toString().padEnd(8) + - itemName.padEnd(22) + - priceInPounds.toFixed(2) - ); - }); - - console.log("\nTotal: " + (total / 100).toFixed(2)); -} - -printReceipt(order); From 0161843170498632b73a3c13ad433dcb8bdc3ffe Mon Sep 17 00:00:00 2001 From: russom Date: Mon, 17 Aug 2026 14:19:13 +0100 Subject: [PATCH 20/30] Remove destructuring folder from book-library branch, keep locally --- .gitignore | 2 +- Sprint-1/destructuring/exercise-1/readme.md | 33 ------------------ Sprint-1/destructuring/exercise-2/readme.md | 37 --------------------- Sprint-1/destructuring/exercise-3/readme.md | 21 ------------ 4 files changed, 1 insertion(+), 92 deletions(-) delete mode 100644 Sprint-1/destructuring/exercise-1/readme.md delete mode 100644 Sprint-1/destructuring/exercise-2/readme.md delete mode 100644 Sprint-1/destructuring/exercise-3/readme.md diff --git a/.gitignore b/.gitignore index c4d4e3a1..bfd0d166 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ node_modules **/node_modules .DS_Store -**/.DS_Store \ No newline at end of file +**/.DS_StoreSprint-1/destructuring/ diff --git a/Sprint-1/destructuring/exercise-1/readme.md b/Sprint-1/destructuring/exercise-1/readme.md deleted file mode 100644 index 28ca6c3d..00000000 --- a/Sprint-1/destructuring/exercise-1/readme.md +++ /dev/null @@ -1,33 +0,0 @@ -We can use object destructuring to extract values from an object and assign them to variables in one line. - -```js -let person = { - firstName: "Bruce", - lastName: "Wayne", -}; - -let { firstName, lastName } = person; - -console.log(`Batman is ${firstName}, ${lastName}`); -``` - -The program above will print `Batman is Bruce Wayne`. - -This is more concise than doing this without object destructuring: - -```js -let person = { - firstName: "Bruce", - lastName: "Wayne", -}; - -let firstName = person.firstName; -let lastName = person.lastName; - -console.log(`Batman is ${firstName}, ${lastName}`); -``` - -# Exercise - -- What is the syntax to destructure the object `personOne` in exercise.js? -- Update the parameter of the function `introduceYourself` to use destructuring on the object that gets passed in. diff --git a/Sprint-1/destructuring/exercise-2/readme.md b/Sprint-1/destructuring/exercise-2/readme.md deleted file mode 100644 index 64b5ab1c..00000000 --- a/Sprint-1/destructuring/exercise-2/readme.md +++ /dev/null @@ -1,37 +0,0 @@ -# Exercise 2 - -In `exercise.js`, you have an array that contains a list of people who are at Hogwarts School of Witchcraft and Wizardry. - -For each character you have the following information: - -- First Name -- Last Name -- School House -- Pet -- Occupation - -## Task 1 - -- In `exercise.js` write a program that will take the `hogwarts` array as input and display the names of the people who belong to the Gryffindor house. -- Use object destructuring to extract the values you need out of each element in the array. - -### Expected result - -``` -Harry Potter -Ron Weasley -Hermione Granger -Minerva McGonagall -Albus Dumbledore -``` - -## Task 2 - -- In `exercise.js` write a program that will take the `hogwarts` array as input and display the names of teachers who have pets. -- Use object destructuring to extract the values you need out of each element in the array. - -### Expected result - -``` -Albus Dumbledore -``` diff --git a/Sprint-1/destructuring/exercise-3/readme.md b/Sprint-1/destructuring/exercise-3/readme.md deleted file mode 100644 index 9663f01b..00000000 --- a/Sprint-1/destructuring/exercise-3/readme.md +++ /dev/null @@ -1,21 +0,0 @@ -# Exercise - -- In `exercise.js`, you have been provided with a takeout order. Write a program that will print out the receipt for this order. -- Log each individual item to the console. -- Log the total cost of the order to the console. -- Use object destructuring to access the values you need from each item. -- Pay attention to the exact formatting of the expected result. - -## Expected result - -``` -QTY ITEM TOTAL -1 Hot Cakes 2.32 -2 Apple Pie 2.78 -1 Egg McMuffin 2.80 -1 Sausage McMuffin 3.00 -2 Hot Coffee 2.00 -4 Hash Brown 1.60 - -Total: 14.50 -``` From 5632e7c9701d5a86f409158ff0c921af71a34882 Mon Sep 17 00:00:00 2001 From: russom Date: Mon, 17 Aug 2026 14:23:56 +0100 Subject: [PATCH 21/30] Remove .gitignore from repo, keep locally --- .gitignore | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index bfd0d166..00000000 --- a/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -**/node_modules -.DS_Store -**/.DS_StoreSprint-1/destructuring/ From ab2fe0e443769628b1d4a3f3cae60dbd2078ec6e Mon Sep 17 00:00:00 2001 From: russom Date: Mon, 17 Aug 2026 14:29:03 +0100 Subject: [PATCH 22/30] Restore Sprint-1/destructuring to match main --- Sprint-1/destructuring/exercise-1/exercise.js | 15 ++++ Sprint-1/destructuring/exercise-1/readme.md | 33 +++++++++ Sprint-1/destructuring/exercise-2/exercise.js | 72 +++++++++++++++++++ Sprint-1/destructuring/exercise-2/readme.md | 37 ++++++++++ Sprint-1/destructuring/exercise-3/exercise.js | 8 +++ Sprint-1/destructuring/exercise-3/readme.md | 21 ++++++ 6 files changed, 186 insertions(+) create mode 100644 Sprint-1/destructuring/exercise-1/exercise.js create mode 100644 Sprint-1/destructuring/exercise-1/readme.md create mode 100644 Sprint-1/destructuring/exercise-2/exercise.js create mode 100644 Sprint-1/destructuring/exercise-2/readme.md create mode 100644 Sprint-1/destructuring/exercise-3/exercise.js create mode 100644 Sprint-1/destructuring/exercise-3/readme.md diff --git a/Sprint-1/destructuring/exercise-1/exercise.js b/Sprint-1/destructuring/exercise-1/exercise.js new file mode 100644 index 00000000..1ff2ac5c --- /dev/null +++ b/Sprint-1/destructuring/exercise-1/exercise.js @@ -0,0 +1,15 @@ +const personOne = { + name: "Popeye", + age: 34, + favouriteFood: "Spinach", +}; + +// Update the parameter to this function to make it work. +// Don't change anything else. +function introduceYourself(___________________________) { + console.log( + `Hello, my name is ${name}. I am ${age} years old and my favourite food is ${favouriteFood}.` + ); +} + +introduceYourself(personOne); diff --git a/Sprint-1/destructuring/exercise-1/readme.md b/Sprint-1/destructuring/exercise-1/readme.md new file mode 100644 index 00000000..28ca6c3d --- /dev/null +++ b/Sprint-1/destructuring/exercise-1/readme.md @@ -0,0 +1,33 @@ +We can use object destructuring to extract values from an object and assign them to variables in one line. + +```js +let person = { + firstName: "Bruce", + lastName: "Wayne", +}; + +let { firstName, lastName } = person; + +console.log(`Batman is ${firstName}, ${lastName}`); +``` + +The program above will print `Batman is Bruce Wayne`. + +This is more concise than doing this without object destructuring: + +```js +let person = { + firstName: "Bruce", + lastName: "Wayne", +}; + +let firstName = person.firstName; +let lastName = person.lastName; + +console.log(`Batman is ${firstName}, ${lastName}`); +``` + +# Exercise + +- What is the syntax to destructure the object `personOne` in exercise.js? +- Update the parameter of the function `introduceYourself` to use destructuring on the object that gets passed in. diff --git a/Sprint-1/destructuring/exercise-2/exercise.js b/Sprint-1/destructuring/exercise-2/exercise.js new file mode 100644 index 00000000..e11b75eb --- /dev/null +++ b/Sprint-1/destructuring/exercise-2/exercise.js @@ -0,0 +1,72 @@ +let hogwarts = [ + { + firstName: "Harry", + lastName: "Potter", + house: "Gryffindor", + pet: "Owl", + occupation: "Student", + }, + { + firstName: "Ron", + lastName: "Weasley", + house: "Gryffindor", + pet: "Scabbers", + occupation: "Student", + }, + { + firstName: "Hermione", + lastName: "Granger", + house: "Gryffindor", + pet: "Cat", + occupation: "Student", + }, + { + firstName: "Draco", + lastName: "Malfoy", + house: "Slytherin", + pet: null, + occupation: "Student", + }, + { + firstName: "Cedric", + lastName: "Diggory", + house: "HufflePuff", + pet: null, + occupation: "Student", + }, + { + firstName: "Severus", + lastName: "Snape", + house: "Slytherin", + pet: null, + occupation: "Teacher", + }, + { + firstName: "Filius", + lastName: "Flitwick", + house: "Ravenclaw", + pet: null, + occupation: "Teacher", + }, + { + firstName: "Pomona", + lastName: "Sprout", + house: "Hufflepuff", + pet: null, + occupation: "Teacher", + }, + { + firstName: "Minerva", + lastName: "McGonagall", + house: "Gryffindor", + pet: null, + occupation: "Teacher", + }, + { + firstName: "Albus", + lastName: "Dumbledore", + house: "Gryffindor", + pet: "Phoenix", + occupation: "Teacher", + }, +]; diff --git a/Sprint-1/destructuring/exercise-2/readme.md b/Sprint-1/destructuring/exercise-2/readme.md new file mode 100644 index 00000000..64b5ab1c --- /dev/null +++ b/Sprint-1/destructuring/exercise-2/readme.md @@ -0,0 +1,37 @@ +# Exercise 2 + +In `exercise.js`, you have an array that contains a list of people who are at Hogwarts School of Witchcraft and Wizardry. + +For each character you have the following information: + +- First Name +- Last Name +- School House +- Pet +- Occupation + +## Task 1 + +- In `exercise.js` write a program that will take the `hogwarts` array as input and display the names of the people who belong to the Gryffindor house. +- Use object destructuring to extract the values you need out of each element in the array. + +### Expected result + +``` +Harry Potter +Ron Weasley +Hermione Granger +Minerva McGonagall +Albus Dumbledore +``` + +## Task 2 + +- In `exercise.js` write a program that will take the `hogwarts` array as input and display the names of teachers who have pets. +- Use object destructuring to extract the values you need out of each element in the array. + +### Expected result + +``` +Albus Dumbledore +``` diff --git a/Sprint-1/destructuring/exercise-3/exercise.js b/Sprint-1/destructuring/exercise-3/exercise.js new file mode 100644 index 00000000..b3a36f4e --- /dev/null +++ b/Sprint-1/destructuring/exercise-3/exercise.js @@ -0,0 +1,8 @@ +let order = [ + { itemName: "Hot cakes", quantity: 1, unitPricePence: 232 }, + { itemName: "Apple Pie", quantity: 2, unitPricePence: 139 }, + { itemName: "Egg McMuffin", quantity: 1, unitPricePence: 280 }, + { itemName: "Sausage McMuffin", quantity: 1, unitPricePence: 300 }, + { itemName: "Hot Coffee", quantity: 2, unitPricePence: 100 }, + { itemName: "Hash Brown", quantity: 4, unitPricePence: 40 }, +]; diff --git a/Sprint-1/destructuring/exercise-3/readme.md b/Sprint-1/destructuring/exercise-3/readme.md new file mode 100644 index 00000000..9663f01b --- /dev/null +++ b/Sprint-1/destructuring/exercise-3/readme.md @@ -0,0 +1,21 @@ +# Exercise + +- In `exercise.js`, you have been provided with a takeout order. Write a program that will print out the receipt for this order. +- Log each individual item to the console. +- Log the total cost of the order to the console. +- Use object destructuring to access the values you need from each item. +- Pay attention to the exact formatting of the expected result. + +## Expected result + +``` +QTY ITEM TOTAL +1 Hot Cakes 2.32 +2 Apple Pie 2.78 +1 Egg McMuffin 2.80 +1 Sausage McMuffin 3.00 +2 Hot Coffee 2.00 +4 Hash Brown 1.60 + +Total: 14.50 +``` From 20a09c3156162fbc932d1f18ff2c03a823d251c6 Mon Sep 17 00:00:00 2001 From: russom Date: Tue, 18 Aug 2026 09:54:41 +0100 Subject: [PATCH 23/30] update: implement setup function --- debugging/book-library/script.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/debugging/book-library/script.js b/debugging/book-library/script.js index f4dd4e83..b7c71b43 100644 --- a/debugging/book-library/script.js +++ b/debugging/book-library/script.js @@ -1,3 +1,8 @@ +function setup() { + populateStorage(); + render(); +} + let myLibrary = []; window.addEventListener("load", function (e) { From 5de411e44706ace0ea0a5ad3ada1e2b015f268b9 Mon Sep 17 00:00:00 2001 From: russom Date: Tue, 18 Aug 2026 10:01:48 +0100 Subject: [PATCH 24/30] update: move myLibrary variable to the top --- debugging/book-library/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debugging/book-library/script.js b/debugging/book-library/script.js index b7c71b43..cbbd6fc6 100644 --- a/debugging/book-library/script.js +++ b/debugging/book-library/script.js @@ -1,10 +1,10 @@ +let myLibrary = []; + function setup() { populateStorage(); render(); } -let myLibrary = []; - window.addEventListener("load", function (e) { populateStorage(); render(); From 39fe2e18eab27f11a411e97e6f36e600347453ef Mon Sep 17 00:00:00 2001 From: russom Date: Tue, 18 Aug 2026 10:17:27 +0100 Subject: [PATCH 25/30] update: remove empty space between codes --- .gitignore | 4 ++++ .vscode/settings.json | 3 +++ debugging/book-library/script.js | 4 ++++ 3 files changed, 11 insertions(+) create mode 100644 .gitignore create mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..bfd0d166 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +node_modules +**/node_modules +.DS_Store +**/.DS_StoreSprint-1/destructuring/ diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..2f836120 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5503 +} diff --git a/debugging/book-library/script.js b/debugging/book-library/script.js index cbbd6fc6..7a37adb0 100644 --- a/debugging/book-library/script.js +++ b/debugging/book-library/script.js @@ -19,6 +19,7 @@ function populateStorage() { "127", true ); + myLibrary.push(book1); myLibrary.push(book2); } @@ -67,6 +68,7 @@ function render() { let pagesCell = row.insertCell(2); let wasReadCell = row.insertCell(3); let deleteCell = row.insertCell(4); + titleCell.innerHTML = myLibrary[i].title; authorCell.innerHTML = myLibrary[i].author; pagesCell.innerHTML = myLibrary[i].pages; @@ -76,6 +78,7 @@ function render() { changeBut.className = "btn btn-success"; wasReadCell.appendChild(changeBut); + let readStatus = ""; if (myLibrary[i].check == false) { readStatus = "No"; @@ -94,6 +97,7 @@ function render() { deleteCell.appendChild(delButton); delButton.className = "btn btn-warning"; + delButton.innerHTML = "Delete"; delButton.addEventListener("click", function () { From bff1d88d010564275e2aaabd862f0dfbbe0db022 Mon Sep 17 00:00:00 2001 From: russom Date: Tue, 18 Aug 2026 13:53:52 +0100 Subject: [PATCH 26/30] remove accidentally committed files --- .gitignore | 4 ---- .vscode/settings.json | 3 --- 2 files changed, 7 deletions(-) delete mode 100644 .gitignore delete mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore deleted file mode 100644 index bfd0d166..00000000 --- a/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -**/node_modules -.DS_Store -**/.DS_StoreSprint-1/destructuring/ diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 2f836120..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "liveServer.settings.port": 5503 -} From d2087e55dd455d21ccb0f9d46d1ea28fc19989c6 Mon Sep 17 00:00:00 2001 From: russom Date: Tue, 18 Aug 2026 14:02:07 +0100 Subject: [PATCH 27/30] update: add html language attribute --- debugging/book-library/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debugging/book-library/index.html b/debugging/book-library/index.html index 23acfa71..8c656181 100644 --- a/debugging/book-library/index.html +++ b/debugging/book-library/index.html @@ -1,5 +1,5 @@ - + Date: Tue, 18 Aug 2026 14:06:50 +0100 Subject: [PATCH 28/30] update: add book library to title element --- debugging/book-library/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debugging/book-library/index.html b/debugging/book-library/index.html index 8c656181..69a6fad2 100644 --- a/debugging/book-library/index.html +++ b/debugging/book-library/index.html @@ -1,7 +1,7 @@ - + Book Library Date: Tue, 18 Aug 2026 14:53:32 +0100 Subject: [PATCH 29/30] update: check html with w3 validator --- debugging/book-library/index.html | 34 ++++++++++++++----------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/debugging/book-library/index.html b/debugging/book-library/index.html index 69a6fad2..56cd30c2 100644 --- a/debugging/book-library/index.html +++ b/debugging/book-library/index.html @@ -1,20 +1,16 @@ - - + + - Book Library - + Book Library + + - + href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"> + @@ -31,20 +27,20 @@

Library

+ > + > Library id="pages" name="pages" required - /> + > + onclick="submit()" + >
From aee7d44f0726a886ae7219d67d9f770a2f6e872a Mon Sep 17 00:00:00 2001 From: russom Date: Tue, 18 Aug 2026 14:59:00 +0100 Subject: [PATCH 30/30] update: check css code in w3c validator --- debugging/book-library/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debugging/book-library/style.css b/debugging/book-library/style.css index 302950cb..ee1d910b 100644 --- a/debugging/book-library/style.css +++ b/debugging/book-library/style.css @@ -2,7 +2,7 @@ width: 400px; height: 300px; align-self: left; - padding-left: 20px; + text-align: 20px; } .btn {