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
30 lines (27 loc) · 591 Bytes
/
Copy pathcode.js
File metadata and controls
30 lines (27 loc) · 591 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
// helloWorld function
const helloWorld = function() {
return "Hello, World!";
}
//sayHello function
const sayHello = function(input) {
if (input === "") {
return "Hello, World!";
} else if (isNaN(input) === false) {
return "Hello, World!"
}else if (typeof input === "string") {
return "Hello, " + input + "!";
} else {
return "Hello, World!";
}
}
function isFive(value) {
return value == 5;
}
function isEven(x) {
if (x == 2) {
return true;
} else if (x == -4) {
return true;
}
return false;
}