const [firstElement, secondElement] = list; // is equivalent to: // const firstElement = list[0]; // const secondElement = list[1]; // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment