Use array destructuring in javascript

Javascript array destructuring is a good way for accessing array element without using indexes

Array destructuring

const names = ['Adama', 'Mouhamed', 'Berenger', 'Pathe', 'Aliou'];

let [first, second] = names;
console.log(first, second);
//Output Adama Mouhamed

let [, , third, , last] = names;
console.log(third, last);
//Output Berenger Aliou

let [adama, ...restOfNames] = names;
console.log(adama, restOfNames);
//Output Adama ['Mouhamed', 'Berenger', 'Pathe', 'Aliou']