What is it?
Optional Chaining allows us to check if an object exists before trying to access its properties. Some other languages have something similar. C#, for example, has a Null Conditional Operator that behaves very similarly as the proposed Optional Chaining.
Why do we need it?
Have you ever had to check for the existence of objects or arrays before accessing its properties? If you forget, it may look a little bit like this:
... read the whole story at dev.to.