GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Modul 16 von 18 · Flussdiagramm

Nested loops flowchart

Kostas Diakogiannis

Nested Loops

Nested loops is also a possible feature. That means you can create a loop inside a loop. This is very useful when we want to make a repetitive task, and for each item of it we want to assign another repetitive task one more.

For example what if we want to find all customers of our web app that are coming from Iran and they were born after 1988 (are under 30 years old), those are two different properties. First we need to find those that are coming from Iran, so we need to loop through ALL customers, and every time we find someone coming from Iran, we also loop through all the other properties to find it's birthdate and if it's before 1988. There are also other ways to solve this problem (such as object properties) but until then we will stick to this.

Let's see a practical example.

Anleitung

Um im Kurs weiterzukommen, sende einen Versuch dieses Quiz ab. Du kannst ihn nach der letzten Frage absenden.

Zum gewählten Modul

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck