From eede8638966d06f2525803281c651c0ac30de030 Mon Sep 17 00:00:00 2001 From: Alena Trushnikova Date: Thu, 29 Oct 2020 22:22:58 +0000 Subject: [PATCH] Done. --- index.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/index.js b/index.js index e69de29bb..23849f71f 100644 --- a/index.js +++ b/index.js @@ -0,0 +1,29 @@ +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!" + } + + if (string.toUpperCase() === string) { + return "YES INDEED!" + } + + if (string === "I love you, Grandma.") { + return "I love you, too." + } +}