From 1e55ec634bc0764e9c3b178389f587e2ac28d395 Mon Sep 17 00:00:00 2001 From: Eric Holland Date: Fri, 3 Nov 2023 21:40:38 -0400 Subject: [PATCH] Finished second exercise --- 02_repeatString/repeatString.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/02_repeatString/repeatString.js b/02_repeatString/repeatString.js index 4359bbe..3f46f91 100644 --- a/02_repeatString/repeatString.js +++ b/02_repeatString/repeatString.js @@ -1,5 +1,9 @@ -const repeatString = function() { - +const repeatString = function(string, repeats) { + output_str = ''; + for (i = 0; i < repeats; i++) { + output_str = output_str + string; + } + return output_str; }; // Do not edit below this line