From 95a56610287de8509edc03035508523c459d68df Mon Sep 17 00:00:00 2001 From: Joshua Frank Date: Tue, 6 Oct 2020 12:48:31 +0000 Subject: [PATCH 1/2] Done. --- index.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/index.js b/index.js index 765e13650..4f2a2fc55 100644 --- a/index.js +++ b/index.js @@ -1,8 +1,8 @@ -var animal = 'dog' +var animal = 'dog'; function myAnimal() { // You should not need to modify this function - return animal + return animal; } function yourAnimal() { @@ -11,22 +11,23 @@ function yourAnimal() { // 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 + var animal = "cat"; + return animal; } function add2(n) { - return n + two - // Feel free to move things around! - const two = 2 + const two = 2; + return n + two; } var funkyFunction = function() { return function() { - return "FUNKY!" + 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 = funkyFunction +var theFunk = funkyFunction; +theFunk(); \ No newline at end of file From f992cd98db676e2367df9852427fa894c6ba8f9a Mon Sep 17 00:00:00 2001 From: Joshua Frank Date: Tue, 6 Oct 2020 12:53:02 +0000 Subject: [PATCH 2/2] Done. --- index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 4f2a2fc55..49024af68 100644 --- a/index.js +++ b/index.js @@ -28,6 +28,7 @@ var funkyFunction = function() { } // We want to set theFunk equal to "FUNKY!" using our funkyFunction. -// NOTE: you only need to modify the code below this line. +// NOTE: you only need to modify the code below this line + var theFunk = funkyFunction; -theFunk(); \ No newline at end of file +var theFunk = funkyFunction()(); \ No newline at end of file