-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAdvanced.js
More file actions
37 lines (27 loc) · 729 Bytes
/
Advanced.js
File metadata and controls
37 lines (27 loc) · 729 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
// object destructing
// let [fname,lastname,myage]=["yash","varshney",20];
// console.log(fname);
// const person={
// firstName: "Bill",
// lastName: "Gates"
// };
// let {firstName,lastName}=person;
// console.log(firstName);
// Dynamic properties
// let myname="yash";
// const data={
// [myname]: "varshney",
// [89+20]:"how are you"
// };
// console.log(data);
// // Spread Operator
// const colors=['red','green','blue','white'];
// const myColors=['red','green','blue','white','yellow','sunshine'];
// const MYFav=[...colors,'yellow'];
// console.log(MYFav);
const person={
firstName: "Bill",
lastName: "Gates"
};
console.log(Object.values(person));
console.log(Object.entries(person));