Golang

Loops

Golang only has the for loop

for i := 0; i < 10; i++ {
    // i
}

For as a while

The first and third parameters are ommitable
i := 0;
 
for i < 10 {
    i++
}

Forever loop

for{
 
}
 

On this page