August 2016
Beginner to intermediate
847 pages
17h 28m
English
In the preceding examples, you saw the use of code blocks. Let's take a moment to clarify what a block of code is, because you use blocks extensively when constructing conditions and loops.
A block of code consists of zero or more expressions enclosed in curly brackets:
{
var a = 1;
var b = 3;
}You can nest blocks within each other indefinitely:
{
var a = 1;
var b = 3;
var c, d;
{
c = a + b;
{
d = a - b;
}
}
}Best practice tips