Go code
for i := 1; i <= 3; i++ {
if i == 2 {
continue
}
fmt.Println(i)
}Line-by-line explanation
- The loop visits 1, 2, and 3.
- At 2, continue skips the remaining body.
- Println runs for 1 and 3.
Expected output
1
3This is the expected result.