javascript-if Flashcards
1
Q
Give 6 examples of comparison operators.
A
,>=,<=, ===,!==
2
Q
What data type do comparison expressions evaluate to?
A
single Boolean value of either True or False
3
Q
What is the purpose of an if statement?
A
tell a computer what to do with certain information
4
Q
Is else required in order to use an if statement?
A
no
5
Q
Describe the syntax (structure) of an if statement.
A
check the expression to see whether a condition is met and returns a value based on the output obtained
6
Q
What are the three logical operators?
A
||,&&, !
7
Q
How do you compare two different expressions in the same condition?
A
parenthesis