GoConqr has a new look! Let us know what you think.

Module 16 of 18 · Flowchart

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.

Instructions

You must submit an attempt for this quiz to progress. You can submit it after the last question.

Go to the chosen module

Feedback

What is it about?

What do you think of the new look?

How do you like it?