October 2018
Intermediate to advanced
370 pages
9h 15m
English
The if statement can be perceived as a filter method that is designed to channel the relevant data, and further operate, drive, or act on that information.
As with most programming languages in common practice, there are code blocks that are dependent on certain parameters, variables, and conditions that may only execute when a certain situation is true or false. if statements are used when a decision needs to be made; this works with Boolean logic, which means that the conditions defined for an if can only have two outcomes, true and false:
if (a > b) { max = a}
When an if statement is present and the condition is true, the primary code block is executed. If not, the code block is ignored, as we can see in the following ...
Read now
Unlock full access