Skip to content

Instantly share code, notes, and snippets.

@codinginflow
Created February 15, 2021 02:09
Show Gist options
  • Save codinginflow/8aec79a0e3a8c5d0b3689a5e6d400be7 to your computer and use it in GitHub Desktop.
Save codinginflow/8aec79a0e3a8c5d0b3689a5e6d400be7 to your computer and use it in GitHub Desktop.
Kotlin for Beginners Part 10
fun main() {
val names = arrayOf("Jim", "John", "Jenny", "Jamie")
//for (name in names) println(name)
names.indices
//Index: ___ Element: ___
//for (i in 1..10) println(i)
//for (i in 1 until 10) println(i)
//for (i in 10L downTo 1) println(i)
//for (i in 'a'..'z' step 2) println(i)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment