Destructuring is a convenient way of extracting values from data stored in (possibly nested) objects and Arrays.
Object destructuring
Destructuring objects:
A variable can be extracted from an object and assigned to a variable with a different name than the object property.
Nested object and array destructuring
Array destructuring
Basic variable assignment
A variable can be assigned a default, in the case that the value pulled from the array is undefined.
When the regular expression exec() method finds a match, it returns an array containing first the entire matched portion of the string and then the portions of the string that matched each parenthesized group in the regular expression.
Destructuring assignment allows you to pull the parts out of this array easily, ignoring the full match if it is not needed.