So this is the pic
so as you can see why do I have to use the dot operator after trying to do the optional chaining ?
I tried to exclude it but then it shows error.
Any help is appreciated.
The reason is that ?
and ?.
are two different things. Only the latter is Option chaining, so if you remove the period, you have a start of a ternary operation.
Also note that The optional chaining ?.
is not an operator, but a special syntax construct src