Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

what does the syntax `??` mean in javascript ES6/ES7? [duplicate]

$
0
0

I recently came across this syntax ??. Does this do the same operation that a ternary operator does?

<Text>        You are selecting {city?.name ?? 'none'} : {street?.name ?? 'none'}</Text>

If no, how is this different from the ternary condition

<condition> ? doSomething: doAnotherThing


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>