Question from the Kotlin test

Write a Kotlin code that prints 7 to the console.

Medium
val ints = listOf(5, -1, 2, 5, -5, -2)
val sum = ints.filter { it > 0 }.drop(1).sum()
print(sum)

What does the console show?

Author: W3D TeamStatus: PublishedQuestion passed 491 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!