195k views
0 votes
When do we use an if- statement ​

2 Answers

1 vote

Answer:

The if statement is used to check a condition and if the condition is true, we run a block of statements (called the if-block), else we process another block of statements (called the else-block). The else clause is optional.

Step-by-step explanation:

User Pgrosslicht
by
5.1k points
2 votes

Answer:

You'd use an if statement if something happens. What I mean is that {If this happens} Then that happens but if the if doesnt happen then the then doesnt happen

Step-by-step explanation:

User Thomas Jensen
by
4.9k points