Frontend
Interviews
.dev
Problems
646. Destructuring Defaults Trigger Only on undefined
Easy
•
...
Predict the output.
const
{
a
=
1
,
b
=
2
}
=
{
a
:
null
,
b
:
undefined
}
console
.
log
(
a
,
b
)
What is printed in the console?
1 2
null 2
null undefined
1 undefined
Submit Answer
Reveal Answer
Select an option and submit your answer.
Next Problem
Auto-advance on correct answer