-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
34 lines (27 loc) · 826 Bytes
/
index.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
31
32
33
34
var animal = 'dog';
const two = 2;
function myAnimal() {
// You should not need to modify this function
return animal;
}
function yourAnimal() {
var animal = 'cat';
// The tests expect this function to return `animal` just like the previous function
// However, you cannot simply modify the existing variable declared on line 1 in the global scope
// How can we make sure that this function
// and the above function both pass?
// P.S.: Hard-coding 'cat' below will not work
return animal;
}
function add2(n) {
return n + two;
// Feel free to move things around!
}
var funkyFunction = function() {
return function() {
return "FUNKY!";
}
}
// We want to set theFunk equal to "FUNKY!" using our funkyFunction.
// NOTE: you only need to modify the code below this line.
var theFunk = "FUNKY!"