Skip to content

Commit 2553f70

Browse files
repeat-str.test.js checked test result
1 parent f30a568 commit 2553f70

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

‎practice-tdd/repeat-str.js‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ export function repeatStr(str, count) {
55
if (count === 0) {
66
return "";
77
}
8-
9-
8+
109
// 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).
1110
// The goal is to re-implement that function, not to use it.
1211
let result = "";
@@ -18,11 +17,4 @@ export function repeatStr(str, count) {
1817

1918
}
2019

21-
//let result = ""
22-
//let counter = count
23-
//while (counter > 0) {
24-
// result += str
25-
// counter--
26-
//}
27-
//return result
2820

0 commit comments

Comments
 (0)