Destructuring Example 11

Destructuring arrays - separate declaration and assignment

by shravan

Babel + JSX

let numbers = [1, 2, 3, 4, 5];

let a, b, c, d, e;

[a, b, c, d, e] = numbers;

console.log(a, b, c, d, e); //1 2 3 4 5