You are given a partially-written Kotlin code that intents to loop over a range of numbers and print each number in the loop. Fill in the blanks in the provided code to complete the task efficiently and correctly.
For loop and ranges
Looping over a range of numbers
Report a typo
Fill in the gaps with the relevant elements
fun main() {
val =
(element range) {
println("Element: $element")
}
}Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.