Learning Javascript Loop

When we have to repeat anything or if we want to write counting up to 1 then 1000, then the loop is done. 1 So counting up to 10000 can be written in two ways in JavaScript. First write the code given below 1 b one app or second you loop it.

Console.log(1);
Console.log(2);
Console.log(3);
Console.log(4);

 

Or something that we cannot do by typing again and again. Our loop does the same thing.

Definition of the LOOP

A loop is an instruction that repeats itself until a specific condition proves to be false.

There are three type of loop in programming language.

for, while, do-while

 

How Loop works

 

Leave a Reply

Your email address will not be published. Required fields are marked *