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 09a628b commit a87356bCopy full SHA for a87356b
Sprint-3/2-practice-tdd/get-ordinal-number.js
@@ -1,9 +1,8 @@
1
function getOrdinalNumber(num) {
2
-
3
if (!Number.isInteger(num) || num <= 0) {
4
return "Invalid input";
5
}
6
-if (num % 100 >= 11 && num % 100 <= 13) {
+ if (num % 100 >= 11 && num % 100 <= 13) {
7
return num + "th";
8
9
switch (num % 10) {
0 commit comments