Skip to content

Commit 09a628b

Browse files
committed
made if statement more concise
1 parent f097ae0 commit 09a628b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function getOrdinalNumber(num) {
22

3-
if (typeof num !== "number" || !Number.isInteger(num) || num <= 0) {
3+
if (!Number.isInteger(num) || num <= 0) {
44
return "Invalid input";
55
}
66
if (num % 100 >= 11 && num % 100 <= 13) {

0 commit comments

Comments
 (0)