feat: initial commit

This commit is contained in:
Smigz 2023-11-18 19:57:34 -05:00
parent d667833847
commit fcb8e17d6b
3 changed files with 52 additions and 0 deletions

20
library/js/script.js Normal file
View file

@ -0,0 +1,20 @@
const myLibrary = [];
function Book(title, author, pages, read) {
this.title = title;
this.author = author;
this.pages = pages;
this.read = read;
this.info = function(){
// returns book info
let haveRead = this.read ? "have read" : "have not read";
return `${this.title}, by ${this.author}, ${this.pages} pages, ${haveRead}`;
};
}
function addBookToLibrary(book) {
}