Optional chaining allows you to safely access the nested object properties without the hassle to check validity of each one of them.
Instead of using && to check for null or undefined, directly use ?.
When you want to use an object's property you must check if it exists otherwise you may get a type error.
Thus in ES2020 we have ?. operator which does the job for you.
So when are you going to use optional chaining next?