Looping over a range of numbers

Report a typo

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.

Fill in the gaps with the relevant elements
fun main() {
    val  = 
    (element  range) {
        println("Element: $element")
    }
}
1..5forinrange

Create a free account to access the full topic