Skip to content

Instantly share code, notes, and snippets.

@halilozel1903
Created July 6, 2018 22:02
Show Gist options
  • Save halilozel1903/cfdb71d58563a34f20e94234c0154856 to your computer and use it in GitHub Desktop.
Save halilozel1903/cfdb71d58563a34f20e94234c0154856 to your computer and use it in GitHub Desktop.
val names = arrayOf("Halil", "İbrahim", "Yusuf", "Emre")
val count = names.count()
for (i in 0..count - 1) {
println("Person ${i + 1} is called ${names[i]}")
}
// Person 1 is called Halil
// Person 2 is called İbrahim
// Person 3 is called Yusuf
// Person 4 is called Emre
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment