if (testExpression) { // statements }
The
if
statement evaluates the test expression inside parenthesis.
If test expression is evaluated to true, statements inside the body of
if
is executed.
If test expression is evaluated to false, statements inside the body of
if
is skipped.