Skip to content

Commit 53b6621

Browse files
repeat js
1 parent 7ff81d8 commit 53b6621

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,17 @@ function repeatStr() {
55
}
66

77
module.exports = repeatStr;
8+
9+
//fixed
10+
11+
function repeatStr(str, count) {
12+
let result = "";
13+
14+
for (let i = 0; i < count; i++) {
15+
result += str;
16+
}
17+
18+
return result;
19+
}
20+
21+
module.exports = repeatStr;

0 commit comments

Comments
 (0)