Computer Science, asked by DeveshUtya07, 3 months ago

What will be the correct Syntax for creating a for loop in JavaScript?
a) for ( var i=0, i<500, i++)
b) for ( var i=0; i<500; i++)
c) for { var i=0, i<500, i++}
d) for { var i=0; i<500; i++}

Answers

Answered by shivanisikhaa
0

Answer:

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 - loops through a block of code once, and then repeats the loop while a specified condition is true

Similar questions