From 269ab59ae4322c6334f21cf4fa5b78c7baceca35 Mon Sep 17 00:00:00 2001 From: Don Date: Wed, 22 Jun 2022 10:16:41 -0400 Subject: [PATCH] completed activities --- 01_helloWorld/helloWorld.js | 2 +- 02_repeatString/repeatString.js | 4 ++-- 03_reverseString/reverseString.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/01_helloWorld/helloWorld.js b/01_helloWorld/helloWorld.js index b542f3b..1a32052 100644 --- a/01_helloWorld/helloWorld.js +++ b/01_helloWorld/helloWorld.js @@ -1,5 +1,5 @@ const helloWorld = function() { - return 'Hello, World!' + return 'Hello, World!'; }; module.exports = helloWorld; diff --git a/02_repeatString/repeatString.js b/02_repeatString/repeatString.js index 9d4106c..62c3758 100644 --- a/02_repeatString/repeatString.js +++ b/02_repeatString/repeatString.js @@ -2,9 +2,9 @@ const repeatString = function(string, num) { let repeatedString = '' if (num < 0) {return "ERROR"} for (let i = 0; i < num; i++) { - repeatedString += string + repeatedString += string; } - return repeatedString + return repeatedString; }; // Do not edit below this line diff --git a/03_reverseString/reverseString.js b/03_reverseString/reverseString.js index 0990003..a08fd1e 100644 --- a/03_reverseString/reverseString.js +++ b/03_reverseString/reverseString.js @@ -3,7 +3,7 @@ const reverseString = function(string) { for (let i = string.length - 1; i >= 0; i--) { reversedArray.push(string[i]) } - return reversedArray.join('') + return reversedArray.join(''); }; // Do not edit below this line