Optional Chaining
const adventurer = {
name: "Alice",
cat: {
name: "Dinah"
}
}
function* createName() {
return "12"
}
console.log(adventurer.dog?.name);
// undefined
adventurer.dog?.name = createName()
// Error: Left side of assignment is not a reference.