Kotlin - Collections Fundamentals
Identify the error in this Kotlin code snippet:
val items = listOf("x", "y")
if (items.size = 2) {
println("Two items")
}val items = listOf("x", "y")
if (items.size = 2) {
println("Two items")
}= which is assignment, not comparison.== to compare items.size to 2.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions