diff --git a/helloWorld/helloWorld.js b/helloWorld/helloWorld.js index a41264d..3fc431e 100644 --- a/helloWorld/helloWorld.js +++ b/helloWorld/helloWorld.js @@ -1,5 +1,5 @@ const helloWorld = function() { - return '' + return 'Hello, World!' } -module.exports = helloWorld +module.exports = helloWorld \ No newline at end of file diff --git a/repeatString/repeatString.js b/repeatString/repeatString.js index 770119a..201822a 100644 --- a/repeatString/repeatString.js +++ b/repeatString/repeatString.js @@ -1,5 +1,16 @@ -const repeatString = function() { +const repeatString = function(str,n) { + let ans = ''; + + if(n<0) + return 'ERROR'; + else + { + for(let i=0;i