Skip to content

Commit 2a88d09

Browse files
authored
repeatString: Update README to clarify negative number handling (#589)
1 parent 698480c commit 2a88d09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

06_repeatString/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Write a function that simply repeats the string a given number of times:
66
repeatString('hey', 3) // returns 'heyheyhey'
77
```
88

9-
This function will take two arguments, `string` and `num`.
9+
This function will take two arguments, `string` and `num`. If `num` is a negative number, return the string `'ERROR'` instead.
1010

1111
Use loops to implement `repeatString` rather than using the builtin `String.prototype.repeat` which has the same behaviour.
1212

0 commit comments

Comments
 (0)