BAEL-19 iterate

This commit is contained in:
Tomasz Lelek 2017-01-07 12:25:18 +01:00
parent 160b9ae6c3
commit dee7d1ab12
1 changed files with 5 additions and 3 deletions

View File

@ -31,12 +31,14 @@ class ItemManager(val categoryId: String, val dbConnection: String) {
fun main(args: Array<String>) {
val numbers = arrayOf("first", "second", "third", "fourth")
var concat = ""
for (n in numbers) {
println(n)
concat += n
}
for (i in 0..9) {
println(i)
var sum = 0
for (i in 2..9) {
sum += i
}
val firstName = "Tom"