Objects map string or symbol keys to values. Destructuring allows unpacking properties into local bindings.
js
const tx = { to: "0xabc", value: 1n };
const { to, value } = tx;100 XP to Apprentice
Property access, shorthand, and destructuring.
AI translates the explanation and quiz text while preserving code and answer scoring.
Objects map string or symbol keys to values. Destructuring allows unpacking properties into local bindings.
js
const tx = { to: "0xabc", value: 1n };
const { to, value } = tx;1. What does `{ ...tx }` produce?
2. When do you need bracket access?
3. What does destructuring do?