Get Set Learn Go
Example demonstrates working of Switch Statement using the sign to word program. Click here to learn more
func main() {
var sign string = "="
switch sign {
case "=":
fmt.Println("Equal To")
case "<":
fmt.Println("Less Than")
case ">":
fmt.Println("Greater Than")
default:
fmt.Println("Unknown")
}
}
Equal To
Try It Out | Source Code |
« Home Page | Previous « If Else Statement | Next » For Loop |