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 8b8e22f commit b31f116Copy full SHA for b31f116
1 file changed
Sprint-3/2-practice-tdd/repeat.js
@@ -1,10 +1,8 @@
1
-function repeat() {
+function repeat(str, count) {
2
if (arguments.length !== 2) {
3
throw new Error("Function requires exactly two arguments: str and count.");
4
}
5
6
- const [str, count] = arguments;
7
-
8
if (typeof str !== "string") {
9
throw new Error("First argument must be a string.");
10
@@ -28,4 +26,5 @@ function repeat() {
28
26
return result;
29
27
30
+
31
module.exports = repeat;
0 commit comments