-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtask03.html
More file actions
44 lines (40 loc) · 1.14 KB
/
task03.html
File metadata and controls
44 lines (40 loc) · 1.14 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<script>
'use strict'
const post = {
author: "John", //вывести этот текст
postId: 23,
comments: [
{
userId: 10,
userName: "Alex",
text: "lorem ipsum",
rating: {
likes: 10,
dislikes: 2 //вывести это число
}
},
{
userId: 5, //вывести это число
userName: "Jane",
text: "lorem ipsum 2", //вывести этот текст
rating: {
likes: 3,
dislikes: 1
}
},
]
}
console.log(post.author)
console.log(post.comments[0].rating.dislikes)
console.log(post.comments[1].userId)
console.log(post.comments[1].text)
</script>
</body>
</html>