Skip to content

Commit 3243748

Browse files
committed
Update error message for numOfTimes validation to "Invalid numOfTimes: numOfTimes should be an integer"
1 parent d0b6378 commit 3243748

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function repeat(valueToRepeat, numOfTimes) {
2-
// Validate count
2+
// Validate numOfTimes
33
if (!Number.isInteger(numOfTimes)) {
4-
return "Invalid count: count should be an integer";
4+
return "Invalid numOfTimes: numOfTimes should be an integer";
55
}
66
if (numOfTimes < 0) {
77
return "Negative number invalid";

0 commit comments

Comments
 (0)