What is optional chaining?
A safe way to access nested properties without throwing an error if something is
undefined or null.
Example:
console.log(user?.address?.city);
A safe way to access nested properties without throwing an error if something is
undefined or null.
Example:
console.log(user?.address?.city);