1️⃣

4.1 What Are Loops?

4.1 What Are Loops?

What Are They?

Loops can execute a block of code a number of times.

Loops are handy. If you want to run the same code over and over again, you can do so with loops.

Different Kinds of Loops

JavaScript supports different kinds of loops:

  • for - loops through a block of code a number of times.
  • for/in - loops through the properties of an object.
  • for/of - loops through the values of an iterable object
  • while - loops through a block of code while a specified condition is true.

Next Section

2️⃣
4.2 For Loop

⚖️

Copyright © 2021 Code 4 Tomorrow. All rights reserved. The code in this course is licensed under the MIT License. If you would like to use content from any of our courses, you must obtain our explicit written permission and provide credit. Please contact classes@code4tomorrow.org for inquiries.