If/Else
Branching with if
and else
in Go+ is
straight-forward.
Here’s a basic example.
You can have an if
statement without an else.
A statement can precede conditionals; any variables declared in this statement are available in all branches.
Note that you don’t need parentheses around conditions in Go+, but that the braces are required.
Next example: Switch