-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
32 lines (25 loc) · 709 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
var animal = 'dog'
function myAnimal() {
return animal
}
function yourAnimal() {
var animal = 'cat'
// How can we make sure that this function
// and the above function both pass?
// P.S.: You can't just hard-code 'cat' below
return animal
}
function add2(n) {
const two = 2
return parseInt(n, 10) + two
// Feel free to move things around!
}
var funkyFunction = function() {
return function() {
return "FUNKY!"
}
}
// We want 'funkyFunction' on the line below to return a function that returns "FUNKY!" -- how can we accomplish that?
// NOTE: To pass this final test, you only need to modify the code below this line.
var theFunk = funkyFunction()()
theFunk = theFunk()