golang control flow code example
Example: golang control flow
package main
import "fmt"
func main() {
firstName, lastName := "john doex", "jane doe"
if firstName == "john doe" {
fmt.Println("nama saya adalah", firstName)
} else if lastName == "jane doe" {
fmt.Println("nama saya adalah", lastName)
} else {
fmt.Println("salah")
}
if numb := 23; numb == 23 {
fmt.Println("benar")
} else {
fmt.Println("salah")
}
}