Home / Javascript Tips Generated By ChatGPT / Destructuring Arrays in Javascript Extract values from arrays. Source Code let colors = ['red', 'green', 'blue']; let [firstColor, secondColor] = colors; console.log(firstColor); // "red" console.log(secondColor); // "green"