We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00c17a1 commit 8b90237Copy full SHA for 8b90237
1 file changed
Sprint-3/2-practice-tdd/repeat-str.js
@@ -4,9 +4,6 @@ function repeatStr(str, count) {
4
if (count < 0) {
5
throw new Error("Negative count is not allowed");
6
7
- } else if (count === 0) {
8
- return "";
9
-
10
} else {
11
return Array.from({ length: count }, () => str).join("");
12
}
0 commit comments