Beginner
JavaScript
Q26 / 100
What does the optional chaining operator ?. do?
Correct! Well done.
Incorrect.
The correct answer is C) Accesses nested properties safely, returning undefined if any part of the chain is null/undefined
C
Correct Answer
Accesses nested properties safely, returning undefined if any part of the chain is null/undefined
Explanation
user?.address?.city returns undefined (not TypeError) if user or address is null/undefined.
Progress
26/100