-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path08-object.html
More file actions
44 lines (38 loc) · 958 Bytes
/
08-object.html
File metadata and controls
44 lines (38 loc) · 958 Bytes
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">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>object</title>
</head>
<body>
<script>
/*const product = {
name: 'socks',
price: 1090
};
console.log(product);
console.log(product.price);
product.name = "cotton socks";
console.log(product);
product.color = true;
console.log(product);
product.col or = "red";
console.log(product);
*/
const product2 = {
name: 'shirt'
}
console.log(product2);
console.log(JSON.stringify(product2));
console.log('hello'.length);
console.log('hello'.toUpperCase());
const object1 ={
message: 'hello'
}
const object2 = object1;
object1.message = 'good job!';
console.log(object1);
</script>
</body>
</html>