JS Coding Questions Logo
JS Coding Questions
#231💼 Interview

What are the two types of loops in javascript

Advertisement

728x90

1. Entry Controlled loops: In this kind of loop type, the test condition is tested before entering the loop body. For example, For Loop and While Loop comes under this category.

2. Exit Controlled Loops: In this kind of loop type, the test condition is tested or evaluated at the end of the loop body. i.e, the loop body will execute at least once irrespective of test condition true or false. For example, do-while loop comes under this category.

Advertisement

Responsive Ad
🎯 Practice NowRelated Challenge

JavaScript Coding Exercise 60

Test your knowledge with this interactive coding challenge.

Start Coding

Advertisement

728x90
231of476