File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 1- let myLibrary = [ ] ;
1+ const myLibrary = [ ] ;
22
33window . 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 ( ) {
You can’t perform that action at this time.
0 commit comments