Skip to content
ExamplesOpen editor ↗

gopheta

→ for

Repeats a block of code a specific number of times.

gopheta (init; seemo; tswelopele) { ... }

Use gopheta when you know how many times you want to repeat something. The loop has three parts: an initializer, a condition, and an update step.

Print numbers 0 to 4
gopheta (diri i = 0; i < 5; i = i + 1) {
  kwala(i);
}

nako