-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f5ab95d
Showing
4 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const chorus = "Let's dance!"; | ||
for (let repeat = 0; repeat < 10; repeat ++) { | ||
console.log(chorus); | ||
} | ||
|
||
console.log("Until the sun comes up!"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const chorus = "Let's dance!"; | ||
let repeat = 0; | ||
while (repeat < 10) { | ||
if (repeat === 5) { | ||
console.log("Let's get down"); | ||
} | ||
console.log(chorus); | ||
repeat++; | ||
} | ||
console.log("Until the sun comes up!"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const temperature = 12; | ||
|
||
if (temperature < 0) { | ||
console.log("Make sure you pick out a scarf!"); | ||
} else if (temperature < 15) { | ||
console.log("Short sleeves won't cut it"); | ||
} else { | ||
console.log("Short sleeves are perfect!"); | ||
} | ||
|
||
console.log("Now you're ready to go outside!"); | ||
|
||
|
||
|
||
const isCitizen = true | ||
const age = 26 | ||
|
||
if (isCitizen && age > 18) { | ||
console.log("You are eligable to vote"); | ||
} | ||
|
||
if (temperature < -40 || temperature > 40) { | ||
console.log("Stay indoors."); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
for (let i = 100; i <= 200; i++) { | ||
if (i % 3 === 0 && i % 4 === 0) { | ||
console.log("LoopyLighthouse"); | ||
} else if (i % 4 === 0) { | ||
console.log("Lighthouse"); | ||
} else if (i % 3 === 0) { | ||
console.log("Loopy"); | ||
} else { | ||
console.log(i); | ||
} | ||
} |