- Elvis operator
val data = response?.body
val title: String = data?.title ?: 'Page'
- Strings templates
print("Response: ${title}")
- Attribution
val (a, b, c) = object
- When
when (x) {
0, 1 -> print("x == 0 or x == 1")
else -> print("otherwise")
}
- map
val map = mapOf(1 to "Jan", 2 to "Feb")