DEV Community

R.Shobika CSE
R.Shobika CSE

Posted on

LOOPING PART - 1

WHILE LOOP

The While loop is a looping condition it will execute a code until the condition is false.

SYNTAX:

while(condition){
------------
------------
}
Enter fullscreen mode Exit fullscreen mode

Example Program:

let i=1;
while(i<=5){
console.log(i);
i++;
}
Enter fullscreen mode Exit fullscreen mode

output:
1
2
3
4
5

Top comments (0)