Destructuring pulls values out of arrays and objects into clearly named variables. The pattern mirrors the data’s shape, which keeps repeated property access out of the surrounding code.
const coordinates = [18.07, 59.33];
const [longitude, latitude] = coordinates;
const user = { name: "Sam", role: "editor" };
const { name, role: accessLevel } = user;
console.log(name, accessLevel); // Sam editorPractice moves from skipped positions and renamed properties to defaults and destructured function parameters. Destructuring extracts values; it does not copy or update the original collection.