Skip to content

Commit efe757d

Browse files
committed
obj and obj destructuring
1 parent 0907b46 commit efe757d

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

revision/rev2.js

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,26 @@ xyz()
4343
let erg=()=>{
4444
console.log("this is arrow function")
4545
}
46-
erg()
46+
erg()
47+
48+
//object
49+
var obj={}//blank obj
50+
console.log(obj)
51+
var obj1={
52+
name:"mak",
53+
class:2,
54+
work:function(){
55+
console.log("study")
56+
}//method
57+
58+
59+
}
60+
console.log(obj1)
61+
console.log(obj1.work)
62+
obj1.name="kam"
63+
console.log(obj1.name)
64+
65+
66+
//obj destructuring
67+
const {name}=obj1
68+
console.log(name)

0 commit comments

Comments
 (0)