Elvis operator
The Elvis operator is a short form for the Ternary operator for null checks. This operator requires a leading and trailing space.
You can rewrite user.id != null ? user.id : 'N/A'
as user.id
?: 'N/A'
.
The Elvis operator is a short form for the Ternary operator for null checks. This operator requires a leading and trailing space.
You can rewrite user.id != null ? user.id : 'N/A'
as user.id
?: 'N/A'
.