Skip to main content
Skip to content

Loops keyword

aage — continue

aage skips the rest of the current loop round and moves straight on to the next one.

Meaning: "ahead, move on"

How aage works

In a chalo loop, aage still runs the update part, so the counter keeps moving.

In a jab_tak loop there is no update part — if your counter is increased below the aage, it is skipped too, and the loop may never end. Increase the counter before aage.

Syntax

syntax
aage;

Runnable example

Expected output

Press Run to try it

3 teen se divide hota hai6 teen se divide hota hai9 teen se divide hota hai

Same idea in JavaScript and Python

JavaScript
for (let i = 1; i <= 10; i++) {
  if (i % 3 !== 0) continue;
  console.log(i);
}
Python
for i in range(1, 11):
    if i % 3 != 0:
        continue
    print(i)

Common mistakes

Skipping the counter in jab_tak

Here aage jumps over i = i + 1, so i stays at 2 forever and the step limit stops the program.

Galat
rakho i = 0;
jab_tak (i < 5) {
  agar (i == 2) { aage; }
  i = i + 1;
}
Sahi
rakho i = 0;
jab_tak (i < 5) {
  i = i + 1;
  agar (i == 2) { aage; }
  bol(i);
}

aage: frequently asked questions

What is continue called in AltFLang?

aage. It skips to the next round of the nearest jab_tak or chalo loop.