Skip to content

Commit fa3354a

Browse files
fix
1 parent f4e8bed commit fa3354a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
function repeatStr(str, count) {
2+
if (count < 0) {
3+
throw new Error("Count cannot be negative");
4+
}
5+
26
let result = "";
37

48
for (let i = 0; i < count; i++) {

0 commit comments

Comments
 (0)