Today #day27 of #100daysofcode, I have completed 2 lessons: 15,16 in module 3 and a practice program in JS. @Sololearn
Conditionals and loops - module 3
The else statement
- syntax:
else { // executed if condition is false }
- the else statement is created to tell JavaScript the if statement condition is false.
- you can skip the curly braces block code contains only one command line.
The else if Statement
- the else if statement is used when you want to check another condition in execute a block of code other than the if statement condition and just else statement.
- syntax: else if { // executed if condition is false }`
- you can write as many as else if statements you may want to.
Images:
Conclusion
- The else statement
- The else if Statement
- Code problems
- quiz