forked from gocodeup/intro-to-testing-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.js
More file actions
62 lines (55 loc) · 1.11 KB
/
code.js
File metadata and controls
62 lines (55 loc) · 1.11 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// helloWorld function
function helloWorld() {
return "Hello, World!";
}
<<<<<<< HEAD
// sayHello function
function sayHello(input) {
return "Hello, " + input + "!";
}
function isFive(input) {
return input % 5 === 0;
}
function isEven(input) {
if (input % 2 === 0) {
return true;
} else if (input === false) {
return false;
} else if (input === '') {
return false;
}
=======
function sayHello(str) {
if (typeof str !== "string" || str === "" || str === "5") {
return "Hello, World!";
} else
return `Hello, ${str}!`;
}
function isFive(num) {
if (num === 5) {
return true;
}
return typeof num === 'boolean';
}
function isEven(num) {
if (num % 2 === 0) {
return true;
} else
return false;
}
function isVowel(str) {
if (str === "a" ||
str === "e" ||
str === "i" ||
str === "o" ||
str === "u" ||
str === "A" ||
str === "E" ||
str === "I" ||
str === "O" ||
str === "U") {
return true;
}
return false;
>>>>>>> b3693b28cad022720684fb85f0f50f8965170b2f
}