Kotlin Elvis Operator With Multiple Line

June 19, 2018
val result = item ?: run {
    val newItem = Item()
    newItem.isActive = true
    newItem
}
This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.