⭐destructuring assignment
JS ⟩ operator ⟩ assignment ⟩ destructuring
in a destructuring assignment,
left-hand side: specifies one or more variable names using a syntax that mimics array / object literal syntax.
// destructuring assignment
let {a} = {a: 1, b: 2};
let [a, b=0, , ...rest] = iterable;
Last updated
Was this helpful?