For, While and Do Loops

Loops are used when we want to execute any particular statement multiple number of times. Loops can be based on conditions e.g how many times they run or when do they stop executing, after a certain condition is true or false it depends. We will see how to  use different loops.

 There are three types of Loops 'For', 'While' and 'Do While' which will be explained below with examples. 

In the following examples below, default tab shown will be 'Javascript' tab and when you understand the code, move to 'Result' tab and run the code to see output of the code. 

Get hands-on with 1200+ tech skills courses.