(title,author)
| 69 | |
| 70 | //finding a book from myLibrary |
| 71 | const findBook = (title,author) => { |
| 72 | let books = myLibrary.filter((book) => { |
| 73 | return book.title === title && book.author === author; |
| 74 | }); |
| 75 | return books; |
| 76 | } |
| 77 | //To save data to Local Storage |
| 78 | const saveLocal = () => { |
| 79 | localStorage.setItem("myLibrary", JSON.stringify(myLibrary)); |