Table of Contents

Go - Loop (for statement)

About

The for loop is the only loop statement in Go.

It has a number of forms

for initialization; condition; post { 
    // zero or more statements 
}
for condition { 
    // ... 
} 
for { 
    // ... 
}