Skip to content

Commit f5b2341

Browse files
authored
Update Rest-Parameter.js
1 parent cb60009 commit f5b2341

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Rest-Parameter.js

+7
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,10 @@ const [k, ...values] = [1, 2, 3, 4, 5, 6];
1616
console.log(k); // output: 1
1717
console.log(values); // output: [2, 3, 4, 5, 6]
1818

19+
const [a, b, c, ...rest] = [3,2,5,4,1,4,7,8,9];
20+
console.log(a); // output: 3
21+
console.log(b); // output: 2
22+
console.log(c); // output: 5
23+
console.log(rest); // output: [4,1,4,7,8,9]
24+
25+

0 commit comments

Comments
 (0)