Skip to content

Commit b31f116

Browse files
committed
fixed parameter declaration
1 parent 8b8e22f commit b31f116

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
function repeat() {
1+
function repeat(str, count) {
22
if (arguments.length !== 2) {
33
throw new Error("Function requires exactly two arguments: str and count.");
44
}
55

6-
const [str, count] = arguments;
7-
86
if (typeof str !== "string") {
97
throw new Error("First argument must be a string.");
108
}
@@ -28,4 +26,5 @@ function repeat() {
2826
return result;
2927
}
3028

29+
3130
module.exports = repeat;

0 commit comments

Comments
 (0)