From 70e4878c284b3462e6c528dcae41e1b65e33a6fe Mon Sep 17 00:00:00 2001 From: Robert Killion Date: Wed, 5 May 2021 23:07:30 +0000 Subject: [PATCH] Done. --- index.js | 25 +++++++++++++++++++++++++ test/index-test.js | 1 - 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index e69de29bb..27d40f291 100644 --- a/index.js +++ b/index.js @@ -0,0 +1,25 @@ +function shout(string) { + return string.toUpperCase(); +} + +function whisper(string){ + return string.toLowerCase(); +} + +function logShout(string) { + console.log(shout(string)); +} + +function logWhisper(string){ + console.log(whisper(string)); +} + +function sayHiToGrandma(string) { + if (whisper(string)===string) { + return "I can't hear you!"; + } else if (shout(string)===string) { + return "YES INDEED!"; + } else if (string==="I love you, Grandma.") { + return "I love you, too."; + } +} diff --git a/test/index-test.js b/test/index-test.js index 05c3e5981..2b4ffc22a 100644 --- a/test/index-test.js +++ b/test/index-test.js @@ -1,4 +1,3 @@ - describe('shout(string)', function() { it('receives one argument and returns it in all caps', function() { expect(shout('hello')).toEqual('HELLO')