Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Groovy: for loop - break - continue

for (i=0; i < 10; i++) {
    if (i > 2 && i < 5) {
        continue
    }
    if (i > 7) {
        break
    }
    println(i)
}

0
1
2
5
6
7

timestamp: 2019-02-21T21:30:01 tags:

  • for
  • break
  • continue