what is while loop code example
Example 1: while loop in python
j = 0
while j < 3:
print("hello") # Or whatever you want
j += 1
#This runs the loop until reaches 3 and above
Example 2: while loop
var i=1;
while(i<=10){
document.write(i + "<br>");
i++;}
Example 3: while loop
i = 0
while i < 6:
i += 1
if i == 3:
continue
print(i)