163k views
1 vote
How to make a loop in javascript?

User Tiffanie
by
8.0k points

1 Answer

2 votes

Answer:

There are multiple ways to make a loop in javascript, according to the internet, of course.

Step-by-step explanation:

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.

User Yanayaya
by
7.7k points

No related questions found