-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQ27.ts
35 lines (29 loc) · 1.49 KB
/
Q27.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Alien Color Points (Green) Example
// This code demonstrates an if-else chain to reward players based on the alien's color.
let _alienColor: string = 'green';
if (_alienColor === 'green') {
console.log("Congratulations! You just earned 5 points for shooting the green alien.");
} else if (_alienColor === 'yellow') {
console.log("Congratulations! You just earned 10 points for shooting the yellow alien.");
} else if (_alienColor === 'red') {
console.log("Congratulations! You just earned 15 points for shooting the red alien.");
}
// Alien Color Points (Yellow) Example
// This code demonstrates an if-else chain to reward players based on the alien's color.
let __alienColor: string = 'yellow';
if (__alienColor === 'green') {
console.log("Congratulations! You just earned 5 points for shooting the green alien.");
} else if (__alienColor === 'yellow') {
console.log("Congratulations! You just earned 10 points for shooting the yellow alien.");
} else if (__alienColor === 'red') {
console.log("Congratulations! You just earned 15 points for shooting the red alien.");
}
let alienColor: string = 'red';
if (alienColor === 'green') {
console.log("Congratulations! You just earned 5 points for shooting the green alien.");
} else if (alienColor === 'yellow') {
console.log("Congratulations! You just earned 10 points for shooting the yellow alien.");
} else if (alienColor === 'red') {
console.log("Congratulations! You just earned 15 points for shooting the red alien.");
}
export{};