-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Expand file tree
/
Copy pathscript.js
More file actions
executable file
·80 lines (72 loc) · 1.47 KB
/
script.js
File metadata and controls
executable file
·80 lines (72 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/**
* Solution: Create a new object type
*
* - Create a new object type "Book" using a class or an object constructor function.
* - Add at least 5 book objects.
*/
import Backpack from "./Backpack.js";
import Book from "./Book.js";
const everydayPack = new Backpack(
"Everyday Backpack",
30,
"grey",
15,
26,
26,
false,
"December 5, 2018 15:00:00 PST"
);
console.log("The everydayPack object:", everydayPack);
console.log("The pocketNum value:", everydayPack.pocketNum);
console.log("Days since acquired:", everydayPack.backpackAge());
// Book param order: title, author, ISBN, pubYear, pageNumber, currentPage, readStatus
const surveillanceCapitalism = new Book(
"The Age of Surveillance Capitalism",
"Shoshana Zuboff",
9781610395694,
"2019",
691,
691,
"Finished"
);
console.log(surveillanceCapitalism);
const consciousCreative = new Book(
"The Conscious Creative",
"Kelly Small",
9781487008024,
"2020",
216,
216,
"Finished"
);
console.log(consciousCreative);
const techVirtues = new Book(
"Technology and the Virtues",
"Shannon Vallor",
9780190905286,
"2016",
309,
138,
"Reading"
)
console.log(techVirtues);
const poohPhil = new Book(
"Pooh and the Philosophers",
"John Tyerman Williams",
9780749320706,
"1995",
192,
108,
"Reading"
)
console.log(poohPhil);
const zen = new Book(
"Zen and the Art of Motorcycle Maintenance",
"Robert M. Pirsig",
9780060958329,
"1974",
449,
449,
"Finished"
)
console.log(zen);