Page created: 20 Jan 2022
|
Page updated: 14 Feb 2023
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'
.