Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript loop

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
do/while - also loops through a block of code while a specified condition is true

for (let i = 0; i < cars.length; i++) {
  text += cars[i] + "<br>";
}
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #javascript #loop
ADD COMMENT
Topic
Name
2+5 =