From da914e078456b10ed91ace665c7420ca88068af9 Mon Sep 17 00:00:00 2001 From: Jordan Carroll Date: Wed, 7 Oct 2020 02:53:25 +0000 Subject: [PATCH] Done. --- index.js | 17 +++++++++++++++++ test/index-test.js | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index e69de29bb2..b2ba8ab3ed 100644 --- a/index.js +++ b/index.js @@ -0,0 +1,17 @@ +function shout (string) { + return string.toUpperCase() +} +function whisper (string) { + return string.toLowerCase() +} +function logShout (string) { + console.log(string.toUpperCase()) +} +function logWhisper (string) { + console.log(string.toLowerCase()) +} +function sayHiToGrandma (string) { + if (string.toLowerCase() === string) {return "I can't hear you!"} + else if (string.toUpperCase() === string) {return "YES INDEED!"} + else if (string === "I love you, Grandma.") {return "I love you, too."} +} \ No newline at end of file diff --git a/test/index-test.js b/test/index-test.js index 05c3e59816..9f369f9a13 100644 --- a/test/index-test.js +++ b/test/index-test.js @@ -47,4 +47,4 @@ describe('sayHiToGrandma(string)', function() { it('returns "I love you, too." if `string` is "I love you, Grandma."`', function() { expect(sayHiToGrandma("I love you, Grandma.")).toEqual("I love you, too.") }) -}) +}) \ No newline at end of file