Skip to content

Commit 55c51a4

Browse files
create new programs
1 parent 25ae88c commit 55c51a4

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

study/Loops/stopingWhileLoops.js

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
//let keepGoing = true;
2+
//while (keepGoing === true) {
3+
// console.log("and again");
4+
//}
5+
6+
let keepGoing1 = true;
7+
while (keepGoing1 === true) {
8+
console.log("and again");
9+
keepGoing1 = false;
10+
}
11+
12+
let keepGoing = true;
13+
while (keepGoing === true) {
14+
console.log("keepGoing: " + keepGoing);
15+
keepGoing = false;
16+
console.log("keepGoing: " + keepGoing);
17+
}
18+
19+
let isLoading = false;
20+
while (isLoading === true) {
21+
console.log("Loading Game");
22+
}
23+
24+
let keepGoing2 = true;
25+
while (keepGoing2 === true) {
26+
console.log("Just keep swimming");
27+
keepGoing2 = false;
28+
}
29+
30+
let keepPlaying = true;
31+
while (keepPlaying === true) {
32+
console.log("Now Playing: Dolce Vita");
33+
keepPlaying = false;
34+
}
35+
36+
let
37+
38+
keepPlaying2 = true;
39+
while (keepPlaying2 === true) {
40+
console.log("Now Playing: Ryan Paris");
41+
keepPlaying2 = false;
42+
}
43+
44+
let autopilotOn = false;
45+
while (
46+
autopilotOn
47+
=== true) {
48+
console.log("Autopilot on: vroom!");
49+
autopilotOn = false;
50+
}
51+
52+
let keepPlaying3 = true;
53+
while (keepPlaying3 === true) {
54+
console.log("Now Playing: Yummy");
55+
keepPlaying3 = false;
56+
}

0 commit comments

Comments
 (0)