-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqno25.js
30 lines (30 loc) · 919 Bytes
/
qno25.js
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
"use strict";
// Qno.25
// Alien Colors #1: Imagine an alien was just shot down in a game. Create a variable called alien_color and assign it a value of 'green', 'yellow', or 'red'.
// • Write an if statement to test whether the alien’s color is green. If it is, print a message that the player just earned 5 points.
// • Write one version of this program that passes the if test and another that fails. (The version that fails will have no output.)
Object.defineProperty(exports, "__esModule", { value: true });
let alien_color = "Green";
if (alien_color == "Green") {
console.log("You earned 5 points");
}
else {
console.log("{}");
}
;
let Alian_color = "Yellow";
if (Alian_color == "Yellow") {
console.log("you earned 10 points");
}
else {
console.log("{}");
}
;
let alian_Color = "Red";
if (alian_Color == "Green") {
console.log("You earned 5 points");
}
else {
console.log("{}");
}
;