From b73edf2112beafda4c34dd823cc43a9639809691 Mon Sep 17 00:00:00 2001 From: MERCY NJAMBI Date: Tue, 19 Mar 2024 20:20:20 +0300 Subject: [PATCH] Update index.js --- index.js | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/index.js b/index.js index e69de29bb..d7d0ff35a 100644 --- a/index.js +++ b/index.js @@ -0,0 +1,39 @@ +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 sayHiToHeadphonedRoommate(string){ + if (string===string.toLowerCase ()){ + return "I can't hear you!" + } + else if (string ===string.toUpperCase()){ + return "YES INDEED!" + } + else if (string==="Let's have dinner together!"){ + return "I would love to!" + + } +} + + + + + + +