mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 08:31:29 +00:00
15 lines
283 B
Kotlin
Vendored
15 lines
283 B
Kotlin
Vendored
// KJS_WITH_FULL_RUNTIME
|
|
// WITH_RUNTIME
|
|
|
|
val arr = arrayOf("a", "b", "c", "d")
|
|
|
|
fun box(): String {
|
|
val s = StringBuilder()
|
|
|
|
for ((i, _) in arr.withIndex()) {
|
|
s.append("$i;")
|
|
}
|
|
|
|
val ss = s.toString()
|
|
return if (ss == "0;1;2;3;") "OK" else "fail: '$ss'"
|
|
} |