The Elvis operator (?:) returns the left-hand side if it's not null, otherwise the right-hand side.
← Kotlin theorytheory 0/50 · 0%
Fundamentals · easy
18. Elvis Operator
Default values for nulls.
Check your understanding
1. Syntax for Elvis?
2. Why is it called Elvis?