Skip to content

Commit 00c17a1

Browse files
authored
Update repeat-str.js
1 parent 485bd79 commit 00c17a1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sprint-3/2-practice-tdd/repeat-str.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ function repeatStr(str, count) {
22
// Your implementation of this function must *not* call String.prototype.repeat (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat).
33
// The goal is to re-implement that function, not to use it.
44
if (count < 0) {
5-
throw new Error("Something went wrong");
5+
throw new Error("Negative count is not allowed");
66

77
} else if (count === 0) {
88
return "";

0 commit comments

Comments
 (0)