Control Structures
if, else if, else
// AND, OR, NOT
if (a == 1 && b == 1) || a == 2 || !b {}
if a {}
else {}
if a == 1 {}
else if a == 2
else {}switch
switch choice {
case 1:
...
break
case 2:
...
default:
...
}for-loops
Regular
Infinite loops
Bounded to a variable's value
Looping arrays
Looping maps
Last updated