Created
February 15, 2021 02:09
-
-
Save codinginflow/8aec79a0e3a8c5d0b3689a5e6d400be7 to your computer and use it in GitHub Desktop.
Kotlin for Beginners Part 10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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