Skip the rest of the code in a loop and start the loop again.

while(true) {
    if (Math.randomRange(0, 10) > 5) {
        // skip the rest of the loop
    // do something

When a program sees a continue inside of a loop, it skips running the rest of the code in the loop from the place of the continue to the end of the loop. The loop doesn’t stop but continues to run again. If the loop uses iteration (a count or index value), like a for loop, it will start again with its next iteration.

See also