-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path10_objects.js
51 lines (33 loc) · 900 Bytes
/
10_objects.js
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
// singleton
// Object literals
const JsUser = {
name : "akash youtube channel",
age : 24,
location : "Andhra pradesh",
mail : "[email protected]",
isLoggedIn: false,
lastLoginDays: ["Monday", "Saturday"]
}
console.log(JsUser.email);
console.log(JsUser["email"]);
// // const tinderUser = new Object()
// // console.log(tinderUser);
// const tinderUser = {}
// tinderUser.id = "123abc"
// tinderUser.name = "Akash"
// tinderUser.isLoggedIn = false
// console.log(tinderUser);
// const regularUser = {
// emial: "[email protected]",
// fullname: {
// userfullname:{
// firstname : "akash reddy",
// lastname: "danapana"
// }
// }
// }
// console.log(regularUser.userfullname);
const obj1 = {1: "a", 2: "b"}
const obj2 = {3: "a", 4: "b"}
const obj3 = {obj1, obj2}
console.log(obj3);