Skip to content

Commit 2478386

Browse files
committed
Removing all the unnecessary
1 parent 1590eec commit 2478386

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ function getOrdinalNumber(num) {
66
num.slice(-2) === "13"
77
) {
88
return num + "th";
9-
} else if (num.slice(-1) === "1") {
9+
}
10+
if (num.slice(-1) === "1") {
1011
return num + "st";
11-
} else if (num.slice(-1) === "2") {
12+
}
13+
if (num.slice(-1) === "2") {
1214
return num + "nd";
13-
} else if (num.slice(-1) === "3") {
15+
}
16+
if (num.slice(-1) === "3") {
1417
return num + "rd";
1518
}
1619
return num + "th";

0 commit comments

Comments
 (0)