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 3bb795f commit cc879bbCopy full SHA for cc879bb
Sprint-3/2-practice-tdd/get-ordinal-number.js
@@ -6,8 +6,8 @@ function getOrdinalNumber(num) {
6
if (lastTwo === 11 || lastTwo === 12 || lastTwo === 13) {
7
return str + "th";
8
}
9
- const lastDigit = num % 10;
10
-if (lastDigit === 1) {
+ const lastDigit = num % 10;
+ if (lastDigit === 1) {
11
return str + "st";
12
} else if (lastDigit === 2) {
13
return str + "nd";
@@ -16,8 +16,6 @@ if (lastDigit === 1) {
16
} else {
17
18
19
-
20
21
22
23
module.exports = getOrdinalNumber;
0 commit comments