Kotlin Ranges
Kotlin Ranges are useful in Kotlin loops
val r1 = 1..5 // This range contains the number 1,2,3,4,5
val r2 = 5 downTo 1 // This range contains the number 5,4,3,2,1
val r3 = 5 downTo 1 step 2 //This range contains the number 5, 3, 1 that means it will move by…