From b038a3f12e187aca462ac189ac94b46ebaaa737e Mon Sep 17 00:00:00 2001 From: endritibra Date: Mon, 30 May 2022 00:18:15 +0200 Subject: [PATCH] Change to solution --- 02_repeatString/repeatString.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/02_repeatString/repeatString.js b/02_repeatString/repeatString.js index 4359bbe..3991d2f 100644 --- a/02_repeatString/repeatString.js +++ b/02_repeatString/repeatString.js @@ -1,5 +1,13 @@ -const repeatString = function() { - +const repeatString = function(stringi,times) { + if(times<0){ + return 'ERROR'} + else{ + let i; + let res=''; +for(i=0;i