Skip to content

Commit 096d45c

Browse files
fix: correct ordinal suffix for special cases in getOrdinalNumber function
1 parent 377b7db commit 096d45c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sprint-3/2-practice-tdd/get-ordinal-number.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function getOrdinalNumber(num) {
44

55
// handles special cases like "11,12,13" to always end in the "Th"
66
if (lastTwoDigits === 11 || lastTwoDigits === 12 || lastTwoDigits === 13){
7-
return num + "St";
7+
return num + "th";
88
}
99
// will return "St" if the number ends in 1.
1010
if (lastDigit === 1){

0 commit comments

Comments
 (0)