You can evaluate a situation by comparing one value in the script to what you expect it might be. The result will be a Boolean: true or fasle

evaluating the condition. Conditions can be much more complex than those shown here, but they usually result in a value of true or false.

comparison operators usually return single values of true or false.

Logical operators allow you to compare the results of more than one comparison operator.

Loops check a condition, if it returns true, a code block will run.

Then the condition will be checked again and if it still returns true, the code block will run again. It repeats until the condition returns false.

There are three common types of loops:

for, while, do while

A for loop uses a counter as a condition.

This instructs the code to run a specified number of times.

Here you can see the condition is made up of three statements:

Initilization, condition and update