mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-12 06:38:45 +01:00
21 lines
290 B
Plaintext
21 lines
290 B
Plaintext
// Single-expression body.
|
|
for (i in [1, 2, 3]) IO.print(i)
|
|
// expect: 1
|
|
// expect: 2
|
|
// expect: 3
|
|
|
|
// Block body.
|
|
for (i in [1, 2, 3]) {
|
|
IO.print(i)
|
|
}
|
|
// expect: 1
|
|
// expect: 2
|
|
// expect: 3
|
|
|
|
// Newline after "for".
|
|
for
|
|
(i in [1, 2, 3]) IO.print(i)
|
|
// expect: 1
|
|
// expect: 2
|
|
// expect: 3
|