function addBookToLibrary() {
  const bookTitle = form.elements["title"].value;
  const bookAuthor = form.elements["author"].value;
  const bookPages = form.elements["pages"].value;
  const bookCover = form.elements["cover"].value;
  const bookRead = form.elements["read"].checked;
  const newBook = new Book(
    bookTitle,
    bookAuthor,
    bookPages,
    bookCover,
    bookRead
  );

  myLibrary.push(newBook);
  localStorage.setItem("myLibrary", JSON.stringify(myLibrary));
}
// function that gathers all information from submitted form and pushes new book on shelf
function that gathers all information from submitted form and pushes new book on shelf
function that gathers all information from submitted form and pushes new book on shelf
function addBookToLibrary() {
  const bookTitle = form.elements["title"].value;
  const bookAuthor = form.elements["author"].value;
  const bookPages = form.elements["pages"].value;
  const bookCover = form.elements["cover"].value;
  const bookRead = form.elements["read"].checked;
  const newBook = new Book(
    bookTitle,
    bookAuthor,
    bookPages,
    bookCover,
    bookRead
  );
  myLibrary.push(newBook);
  localStorage.setItem("myLibrary", JSON.stringify(myLibrary));
}
function addBookToLibrary ( ) { const bookTitle = form . elements [ "title" ] . value ; const bookAuthor = form . elements [ "author" ] . value ; const bookPages = form . elements [ "pages" ] . value ; const bookCover = form . elements [ "cover" ] . value ; const bookRead = form . elements [ "read" ] . checked ; const newBook = new Book ( bookTitle , bookAuthor , bookPages , bookCover , bookRead ) ; myLibrary . push ( newBook ) ; localStorage . setItem ( "myLibrary" , JSON . stringify ( myLibrary ) ) ; }
function that gathers all information from submitted form and pushes new book on shelf
function that gathers all information from submitted form and pushes new book on shelf