Optional chaining ?. in javascript is a new feature introduced in ES2020. Optional chaining changes the way properties are accessed from deeply nested objects. It fixes the problem of having to do multiple null checks when accessing long chain of object properties in javascript.
I teach JavaScript, GraphQL and React lessons. I am a Senior Software Engineer at PayPal and TC39 Delegate.