Skip to content

Commit 1ebc795

Browse files
committed
02_repeatString: fix to reflect test requirement
1 parent 75b55cd commit 1ebc795

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

02_repeatString/repeatString.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const repeatString = function(givenString, timesToRepeat) {
22

33
// Will check if input number is negative and make it positive
44
if (timesToRepeat < 0) {
5-
timesToRepeat *= -1;
5+
return "ERROR";
66
}
77

88
let stringToPrint = '';

0 commit comments

Comments
 (0)