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 b31f116 commit daf6efaCopy full SHA for daf6efa
Sprint-3/2-practice-tdd/repeat.js
@@ -7,7 +7,7 @@ function repeat(str, count) {
7
throw new Error("First argument must be a string.");
8
}
9
10
- if (typeof count !== "number" || !Number.isInteger(count) || count < 0) {
+ if (!Number.isSafeInteger(count) || count < 0) {
11
throw new Error("Second argument must be a non-negative integer.");
12
13
0 commit comments