A brief intro to loops

There are instances when you want to run some code repeatedly many times. Rather than writing that code many times you can write it once and get it repeated several times using loops.

Loops, also known as loops, allow blocks of code to be repeatedly executed automatically a known or unknown number of times.

Loops in JavaScript

In JavaScript we have a handful of choices of loops - the for loop (and its kinds - for..as and for..in) and the while loop (and its another kind - do..while).

The next chapter will focus on the for loop and then we will move on to other types. Just make sure that you are all set with conditions.

Let's begin..