Javascript-If Flashcards

1
Q

Give 6 examples of comparison operators.

A
is equal to ==
is strictly equal to ===
is not equal to !=
is strictly not equal to !==
greater than or equal to >=
less than or equal to <=
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What data type do comparison expressions evaluate to?

A

A boolean value of either true or false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the purpose of an if statement?

A

An if statement evaluates a condition to see if it is true or false. If true, statements within the code block are executed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Is else required in order to use an if statement?

A

No

How well did you know this?
1
Not at all
2
3
4
5
Perfectly