GOCO IDE
  • Home
  • Docs
Download

Documentation

Chapter 1: BasicsChapter 2: Variables & TypesChapter 3: Input and OutputChapter 4: Math and OperatorsChapter 5: Making DecisionsChapter 6: Repeating Parts (Loops)Chapter 7: FunctionsChapter 8: Arrays (Lists)Chapter 9: Standard Libraries

6. Loops: Doing Things Over and Over

6.1 Basic Loop

Loops are a great way to repeat yourself without writing the same line twice. A simple Loop will keep going as long as its rule is True.

Number count = 0.
Loop (count < 3) {
Displaynl(count).
count = count + 1.
}

6.2 The Till Loop

You can write all loop instructions in a single line using Till. You give it a start, a rule to end, and a way to climb up.

Loop (Number step = 0 Till step < 3, step++) {
Displaynl("Walking step: " + step).
}

6.3 Stopping Early

You can jump out of a loop at any time using Break. If you want to skip the current step but keep looping, use Continue.

Loop (Number i = 1 Till i < 5, i++) {
If (i == 2) {
Continue.
}
If (i == 4) {
Break.
}
Displaynl(i).
}

Contact Us

+91 93269 63378kancorp.inc@outlook.com
📍KanCorp Inc, India

Quick Links

  • Home
  • Docs
  • Download IDE

Stay Updated

Subscribe to get updates on new features and learning resources!

© 2026GOCO IDE™. All rights reserved. Made with ❤️