Control structures determine how the program flows.

We have 2 important types of control structures.

The first is conditionals, and the second is loops. All of the things described in this section are statements.

JavaScript has different kind of structures that can help us in all the different situations:


  • if / else
  • switch


  • for
  • for..of
  • while
  • do..while
  • Array.forEach

Let’s go into each single one.

Go to the next lesson