From 899259ce56823a824244b4f99067eaa35a7eb477 Mon Sep 17 00:00:00 2001 From: Yearim Yi Date: Thu, 22 Apr 2021 16:02:31 +0000 Subject: [PATCH 1/2] Done. --- index.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/index.js b/index.js index e69de29bb..0481a4bc2 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 (string.toUpperCase()) +} + +function logWhisper(string) { + console.log (string.toLowerCase()) +} + +function sayHiToGrandma(string) { + if (string === string.toLowerCase()) { + return "I can't hear you!" + } if (string === string.toUpperCase()) { + return "YES INDEED!" + } if (string === "I love you, Grandma.") { + return "I love you, too." + } + } \ No newline at end of file From 38189dc4f610248e23d4719f9e2c03d0bd81a37f Mon Sep 17 00:00:00 2001 From: Yearim Yi Date: Mon, 21 Jun 2021 20:49:45 +0000 Subject: [PATCH 2/2] Done. --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 0481a4bc2..0990f2421 100644 --- a/index.js +++ b/index.js @@ -17,9 +17,9 @@ function logWhisper(string) { function sayHiToGrandma(string) { if (string === string.toLowerCase()) { return "I can't hear you!" - } if (string === string.toUpperCase()) { + } else if (string === string.toUpperCase()) { return "YES INDEED!" - } if (string === "I love you, Grandma.") { + } else if (string === "I love you, Grandma.") { return "I love you, too." } } \ No newline at end of file