"use strict"; console.log("App"); let addForm = document.getElementById("addFormElement"); addForm.addEventListener("submit", addBook); let bookTable = document.getElementById("bookTableBody"); let lastBookId = 0; function genBookId() { return lastBookId++; } let books = {}; function addBook(event){ event.preventDefault(); console.log("Add Book", event.target.bookTitle.value); let bookId = genBookId(); let book = { title: event.target.bookTitle.value, genre: event.target.bookGenre.value, desc: event.target.bookDesc.value } books[bookId] = book; let row = `