FrontendInterviews.dev

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?

Select an option and submit your answer.
Next Problem