One of the most important features of ES6 is https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment of arrays and objects. So, using destructuring its possible to unpack values from arrays, or properties from objects, into distinct variables like so. const [firstName, lastName, age] = ['Cherika', 'Merchant', 5]; firstName; // 'Cherika' lastName; // 'Merchant' age; // 5 #the-problem #choosing-a-specific-index
And because of this, if you only want to retrieve say lastName, you would need to do something like this. const [, lastName,] = ['Cherika', 'Merchant', 5]; lastName; // 'Merchant'