Skip to content

Commit 8b90237

Browse files
authored
Update repeat-str.js
1 parent 00c17a1 commit 8b90237

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ function repeatStr(str, count) {
44
if (count < 0) {
55
throw new Error("Negative count is not allowed");
66

7-
} else if (count === 0) {
8-
return "";
9-
107
} else {
118
return Array.from({ length: count }, () => str).join("");
129
}

0 commit comments

Comments
 (0)