continue and break

suggest change

Example for continue

for i in [series]
do
    command 1
    command 2
    if (condition) # Condition to jump over command 3
            continue # skip to the next value in "series"
    fi
    command 3
done

Example for break

for i in [series]
do
    command 4
    if (condition) # Condition to break the loop
    then
            command 5 # Command if the loop needs to be broken
            break
    fi
    command 6 # Command to run if the "condition" is never true 
done

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents