Kolin – Elvis operator

Today I discovered Elvis operator ‘?:’ in Kotlin programming language.

This code shows firstName if it is not null, otherwise it shows lastName. In this case it shows lastName.

Leave a comment

Your email address will not be published. Required fields are marked *