1.

Types of loop in JavaScript are ______,______a. For……….loopb. do ………. Endc. While………loopd. While……..wende. for………next​

Answer»

ANSWER:

while — loops through a block of code as long as the CONDITION specified evaluates to TRUE.

do…while — loops through a block of code once; then the condition is evaluated. If the condition is true, the statement is REPEATED as long as the specified condition is true.

for — loops through a block of code until the counter reaches a specified number.

for…in — loops through the properties of an object.

for…of — loops over iterable OBJECTS such as arrays, strings, etc.



Discussion

No Comment Found