Conditional Statements Flashcards

1
Q

Inside the _, a condition is provided that evaluates to true or false.

A

parentheses ()

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

The __ keyword followed by a set of parentheses () which is followed by a code block, or block statement, indicated by a set of curly braces {}

A

if

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

An ____ statement must be paired with an if statement, and together they are referred to as an if…else statement.

A

else

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

________ statements allow us to automate solutions to yes-or-no questions, also known as binary decisions.

A

if…else

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

the and operator … checks if BOTH provided expressions are truthy.

A

&&

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

the or operator … checks if EITHER provided expression is truthy.

A

||

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

the not operator, otherwise known as the bang operator

Also switches the truthiness and falsiness of a value.

A

!

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

A ______ statement can be used to simplify the process of writing multiple else if statements. The break keyword stops the remaining cases from being checked and executed in a _______ statement.

A

switch

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