if statements Flashcards

(4 cards)

1
Q

what are if statements

A

will perform certain tasks depending on whether a condition is met

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

how do you run code if both variables are true

A

if (ans && ans2)

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

how do you run code without needing both variables to be true

A

if (ans || ans2);

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

how to make variables false

A

!ANS

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