Skip to content

Commit 86a9ca2

Browse files
committed
fixed the issues after feedback from pull request
1 parent a8d6abd commit 86a9ca2

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

debugging/book-library/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ <h1>Library</h1>
5959
required
6060
min="1"
6161
step="1"
62-
pattern=""
6362
>
6463
<label class="form-check-label">
6564
<input

debugging/book-library/script.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
let myLibrary = [];
1+
const myLibrary = [];
22

33
window.addEventListener("load", function () {
44
populateStorage();
@@ -78,14 +78,14 @@ function render() {
7878
const deleteCell = row.insertCell(4);
7979
titleCell.textContent = myLibrary[i].title;
8080
authorCell.textContent = myLibrary[i].author;
81-
pagesCell.textContent = myLibrary[i].pages;
81+
pagesCell.textContent = Number(myLibrary[i].pages);
8282

8383
//add and wait for action for read/unread button
8484
const changeButton = document.createElement("button");
8585
changeButton.className = "btn btn-success";
8686
wasReadCell.appendChild(changeButton);
8787
let readStatus = "";
88-
myLibrary[i].check ? (readStatus = "Yes") : (readStatus = "No");
88+
readStatus = myLibrary[i].check ? "Yes" : "No";
8989
changeButton.innerText = readStatus;
9090

9191
changeButton.addEventListener("click", function () {

0 commit comments

Comments
 (0)