Closed Pyroarsonist closed 4 months ago
Optional chaining should be used on all "chains" or should be avoided at all.
For example, if you using eng?.firstName.name, than eng?.firstName could be evaluated to undefined and (undefined)?.name would throw TypeError.
eng?.firstName.name
eng?.firstName
undefined
(undefined)?.name
TypeError
тримай
Thank You for your passion!
Optional chaining should be used on all "chains" or should be avoided at all.
For example, if you using
eng?.firstName.name
, thaneng?.firstName
could be evaluated toundefined
and(undefined)?.name
would throwTypeError
.