var a, b;
[a, b] = [10, 20];
console.log('a: ' + a);
console.log('b: ' + b);
var rest;
[c, d, ...rest] = [10, 20, 30, 40, 50];
console.log('c: ' + c);
console.log('d: ' + d);
console.log('rest: ' + rest.toString());
var e, f;
[e, , f] = [11, 13, 5];
console.log('e: ' + e);
console.log('f: ' + f);
Output
a: 10
b: 20
c: 10
d: 20
rest: 30,40,50
e: 11
f: 5