Skip to content

Commit 649e4af

Browse files
authored
Fix getOrdinalNumber function to handle inputs
1 parent 6183172 commit 649e4af

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function getOrdinalNumber(num) {
2-
return "1st";
2+
33
const lastDigit = num % 10;
44
const lastTwoDigits = num % 100;
55
if (lastTwoDigits === 11 || lastTwoDigits === 12 || lastTwoDigits === 13) {

0 commit comments

Comments
 (0)