-
-
Notifications
You must be signed in to change notification settings - Fork 4
elvis
pannous edited this page Feb 19, 2021
·
2 revisions
The elvis operators ?:
and ?.
are safe navigation operators.
However they are serve opposite situations:
If a value is absent, ?:
takes the default to the right. ø?:1 == 1
If a value is available, ?.
proceeds to the right property. {a:1}?.a == 1