34. Go - Continue

Continue statement allows continuing of the loop but voiding everything below it. 

package main

import "fmt"

func main() {

    for i := 0; i < 10; i++ {
        if i%2 == 0 {
            fmt.Println("EVEN", i)
            continue
        }
        fmt.Println("ODD", i)
    }

}

Comments

Popular posts from this blog

2. FreeCodeCamp - Dynamic Programming - Learn to Solve Algorithmic Problems & Coding Challenges

20. Data Analytics - Analyze Data to Answer Questions - Week 1

3. Algorithms - Selection Sort