Skip to content

Commit cb1e4e8

Browse files
committed
fixed the bugs
1 parent 6564055 commit cb1e4e8

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

debugging/book-library/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ <h1>Library</h1>
1818
<p>Add books to your virtual library</p>
1919
</div>
2020

21-
<button data-toggle="collapse" data-target="#demo" class="btn btn-info">
21+
<button data-toggle="collapse" data-target="#demo" class="btn btn-info">
2222
Add new book
2323
</button>
2424

debugging/book-library/script.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ function populateStorage() {
2020
}
2121
}
2222

23-
const titleInput = document.getElementById("title");
24-
const authorInput = document.getElementById("author");
25-
const pagesInput = document.getElementById("pages");
26-
const readCheckBox = document.getElementById("check");
23+
function Book(title, author, pages, check) {
24+
this.title = title;
25+
this.author = author;
26+
this.pages = pages;
27+
this.check = check;
28+
}
2729

2830
//check the right input from forms and if its ok -> add the new book (object in array)
2931
//via Book function and start render function

0 commit comments

Comments
 (0)