WHILE LOOP
The While loop is a looping condition it will execute a code until the condition is false.
SYNTAX:
while(condition){
------------
------------
}
Example Program:
let i=1;
while(i<=5){
console.log(i);
i++;
}
output:
1
2
3
4
5
Top comments (0)