What is this kind of assignment?

let [prev, curr] = [0, 1];

that is called array destructuring, the [0, 1] array items are destructured in the variables to the left

1 Like

so that is what is happening below?

for (let [key, value] of Object.entries(yourobject)) {
    console.log(key, value);
}

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.