207k views
0 votes
When do you use an else statement?

User Yamiko
by
5.6k points

1 Answer

2 votes

Answer: In JavaScript we have the following conditional statements: Use if to specify a block of code to be executed, if a specified condition is true. Use else to specify a block of code to be executed, if the same condition is false. Use else if to specify a new condition to test, if the first condition is false.

Step-by-step explanation:

User Mike Upjohn
by
5.9k points