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
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
Hindi,
1 month ago
Computer Science,
3 months ago
Physics,
8 months ago
Physics,
8 months ago
History,
8 months ago