PRACTICE / UNDERSTAND / REPEAT

JavaScript practice question

Practice destructuring with self-contained questions. Check your answer, then use the explanation to understand the reasoning.

1 questionAnswers explainedFree · no login

Try this question

Destructuring · MCQQuestion link ↗

What does this defaulted destructuring print?

const { count = 1 } = {};
console.log(count);
Choose one answer
Answer & explanation

Answer: 1

A destructuring default applies when the property is missing or undefined.