We have a null-coalescing operator in .NET, and we can use as shown below
string postal_code = address?.postal_code;
Can the same thing be done in React JS?
What I found, how can we do with the && Operator
in address.ts file
string postal_code = address && address.postal_code;
I need a .net function in typescript with JS response, is this possible?
sort of:
string postal_code = address?.postal_code // I am getting the error in this line if I try to use like .NET
source
share