forked from LaunchCodeEducation/javascript-projects
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
33 lines (29 loc) · 905 Bytes
/
index.js
File metadata and controls
33 lines (29 loc) · 905 Bytes
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
let launchCode = {
organization: "nonprofit",
executiveDirector: "Jeff",
percentageCoolEmployees: 100,
programsOffered: ["Web Development", "Data Analysis", "Liftoff"],
launchOutput: function (num) {
let output = "";
if (num % 2 === 0 && num % 3 === 0 && num % 5 === 0) {
output = "LaunchCode Rocks!";
} else if (num % 2 === 0 && num % 3 === 0) {
output = "LaunchCode!";
} else if (num % 3 === 0 && num % 5 === 0) {
output = "Code Rocks!";
} else if (num % 2 === 0 && num % 5 === 0) {
output = "Launch Rocks!";
} else if (num % 2 === 0) {
output = "Launch!";
} else if (num % 3 === 0) {
output = "Code!";
} else if (num % 5 === 0) {
output = "Rocks!";
} else {
output = "Rutabagas! That doesn't work.";
}
return output;
},
};
console.log(launchCode.launchOutput(15));
module.exports = launchCode;