We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75b55cd commit 1ebc795Copy full SHA for 1ebc795
02_repeatString/repeatString.js
@@ -2,7 +2,7 @@ const repeatString = function(givenString, timesToRepeat) {
2
3
// Will check if input number is negative and make it positive
4
if (timesToRepeat < 0) {
5
- timesToRepeat *= -1;
+ return "ERROR";
6
}
7
8
let stringToPrint = '';
0 commit comments