Skip to content

Commit 2957d4b

Browse files
committed
Fix inconsitent icode indentation
1 parent 4153632 commit 2957d4b

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,17 @@ function getOrdinalNumber(num) {
1414
}
1515

1616
// Handle regular suffixes
17-
if (lastDigit === 1) return `${num}st`;
18-
if (lastDigit === 2) return `${num}nd`;
19-
if (lastDigit === 3) return `${num}rd`;
17+
if (lastDigit === 1) {
18+
return `${num}st`;
19+
}
20+
21+
if (lastDigit === 2) {
22+
return `${num}nd`;
23+
}
2024

25+
if (lastDigit === 3) {
26+
return `${num}rd`;
27+
}
2128
// Default suffix
2229
return `${num}th`;
2330
}

0 commit comments

Comments
 (0)