Skip to content

Commit 9e99a04

Browse files
committed
config objects
1 parent 8dbd346 commit 9e99a04

2 files changed

Lines changed: 24 additions & 1 deletion

File tree

js_basics/objects.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,16 @@ const user = {
3434
// }
3535

3636
// console.log(user.greetings());
37-
// console.log(user.greetingsTwo());
37+
// console.log(user.greetingsTwo());
38+
39+
//Object de-structure and JSON API intro
40+
41+
const course = {
42+
coursename : "js in hindi",
43+
price : "999",
44+
courseInstructor : "krish"
45+
}
46+
//this is object de-structure
47+
const {courseInstructor:instructor} = course;
48+
// console.log(courseInstructor);
49+
console.log(instructor);

js_basics/objects2.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//Object de-structure and JSON API intro
2+
3+
const course = {
4+
coursename : "js in hindi",
5+
price : "999",
6+
courseInstructor : "krish"
7+
}
8+
//this is object de-structure
9+
const {courseInstructor:instructor} = course;
10+
// console.log(courseInstructor);
11+
console.log(instructor);

0 commit comments

Comments
 (0)