Skip to content

Latest commit

 

History

History
19 lines (11 loc) · 422 Bytes

lesson_6_dinge.md

File metadata and controls

19 lines (11 loc) · 422 Bytes

Lesson 6 - Verschiedene Dinge

if / else if / else

Sometimes you need more than the two options of a simple if / else. For that we can couple more than one if together in this way:

if (condition1) {

} else if (condition2) {

} else if (condition3) {

} else {

}

As we've seen in the fizzbuzz example, it's important if the conditions overlap, that you keep in mind the order of the conditions.