easy5 pts · first answer countsjavascript
Optional chaining on missing data
What does this print?
const user = { profile: null }
console.log(user.profile?.city)
console.log(user.address?.city ?? 'none')What does this print?
const user = { profile: null }
console.log(user.profile?.city)
console.log(user.address?.city ?? 'none')