Skip to content

Commit 1903cfe

Browse files
author
Siyuan Gao
authored
Create exercise_06.js
1 parent 01dd309 commit 1903cfe

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Lesson07/exercise_06.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// 1
2+
const userInfo = ['John', 'chef', 34];
3+
// 2
4+
let name, age, job;
5+
// 3
6+
[name, job, age] = userInfo;
7+
// 4
8+
console.log(name);
9+
console.log(job);
10+
console.log(age);
11+
// 5
12+
[name, ,age] = userInfo

0 commit comments

Comments
 (0)