Final answer:
Array destructuring in JavaScript is achieved by assigning the first element of the array to a variable using square brackets in a line of code. For the given array, the destructured assignment would simply be const [firstTopic] = topics, making 'cooking' the value of firstTopic.
Step-by-step explanation:
To use array destructuring to get the first item from an array in JavaScript, you can assign the first element of the array to a variable by placing the variable in the spot corresponding to the first index of the array inside square brackets. For the given array const topics = ['cooking', 'art', 'history'], the destructuring assignment would look like this:
const [firstTopic] = topics;
Now, firstTopic would hold the value 'cooking', which is the first item of the topics array. Remember that the other elements are ignored in this destructuring pattern since no additional variables are provided to hold their values.