We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 34162f4 commit ddd9933Copy full SHA for ddd9933
loops.js
@@ -0,0 +1,18 @@
1
+let i = 0;
2
+while (i < 3) //While loop runs as long as the condition is evaluated to true
3
+{
4
+ console.log(i);
5
+ i++;
6
+}
7
+
8
9
10
+do { //Do while loop runs as long as the condition is evaluated to true BUT will also run once at the beginning no matter the condition
11
12
13
+} while (i < 3);
14
15
16
+for (let i = 0; i < 3; i++) { //For loop is a loop that automatically increments itself to a fixed number.
17
+ alert(i);
18
0 commit comments