Skip to content

Commit 3706c1b

Browse files
committed
comments answered and files fixed
1 parent b90c546 commit 3706c1b

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎practice-tdd/get-ordinal-number.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ export function getOrdinalNumber(num) {
1515
} else if (strNum.endsWith("3")) {
1616
return strNum + "rd";
1717
}
18+
return strNum + "th";
1819
}

‎practice-tdd/repeat-str.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
export function repeatStr(str, count) {
2+
if (count < 0) {
3+
throw new Error("Count cannot be negative");
4+
}
25
let result = "";
36
for (let i = 0; i < count; i++) {
47
result += str;

0 commit comments

Comments
 (0)