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
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
for (let i = 1; i <= 10; i++) {
if (i % 3 !== 0) continue;
console.log(i);
}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.
rakho i = 0;
jab_tak (i < 5) {
agar (i == 2) { aage; }
i = i + 1;
}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.