Give 6 examples of comparison operators.
< > <= => == === !=
What data type do comparison expressions evaluate to?
boolean (i.e. true or false)
What is the purpose of an if statement?
Evaluates a condition or expression
Is else required in order to use an if statement?
No
Describe the syntax (structure) of an if statement.
if (keyword) (condition) {
(code to execute if the value is true);
}
What are the three logical operators?
&&
||
!
How do you compare two different expressions in the same condition?
parentheses and a logical operator