Control flow
Five lessons take a script from one line to a decision: if and the ternary, a switch that takes classes and ranges as cases, the loops the language and the GDK offer, the power assert with its real failure output, and the exceptions a script catches and throws.
3.1
if, else and the ternary
conditions, the Elvis default and the block that returns a value
Open
3.2
switch with classifiers
a switch on values, classes, ranges and closures, with fall-through and break
Open
3.3
Loops
for, while, do-while, each, times and the loops that stop early
Open
3.4
The power assert
the real failure output of assert, and how to read the diagram it prints
Open
3.5
Exceptions
try, catch, finally, the multi-catch, and the exception a script really throws
Open