Skip to content

Commit dcf26e7

Browse files
homework_11
1 parent 51220ac commit dcf26e7

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Home work 11</title>
6+
</head>
7+
<body>
8+
9+
<script src="src/main.js"></script>
10+
</body>
11+
</html>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
let user = {
2+
userName: 'userName'
3+
};
4+
5+
let admin = {
6+
emailAdmin: '[email protected]'
7+
};
8+
9+
let guest = {
10+
guestName: 'guestName'
11+
};
12+
13+
let database = {
14+
passwordDatabase: 'password-database',
15+
informationAboutUsers: [],
16+
registerGuest(obj) {
17+
this.informationAboutUsers.push(obj);
18+
}
19+
};
20+
21+
user.__proto__ = admin;
22+
console.log(user.emailAdmin);
23+
24+
admin.__proto__ = database;
25+
console.log(admin.passwordDatabase);
26+
27+
guest.__proto__ = user;
28+
29+
database.registerGuest(guest);
30+
database.registerGuest(guest);
31+
32+
console.log(guest.informationAboutUsers);

0 commit comments

Comments
 (0)