We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1903cfe commit b03339dCopy full SHA for b03339d
Lesson07/exercise_07.js
@@ -0,0 +1,18 @@
1
+// 1
2
+const userInfo = { name: 'John', job: 'chef', age: 34 };
3
+// 2
4
+let name, job;
5
+// 3
6
+({ name, job } = userInfo);
7
+// 4
8
+console.log(name);
9
+console.log(job);
10
+// 5
11
+const userInfo = ['John', 'chef', 34];
12
+let [ name, , age] = userInfo;
13
14
+console.log(age);
15
+// 6
16
+const userInfoObj = { name: 'John', job: 'chef', age: 34 };
17
+let { job } userInfoObj;
18
0 commit comments