Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: check if number is actually odd & add number 375001 #173

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
function isEven(number) {
if (number === "even" || number === "Even" || number === "eVen" || number === "evEn" || number === "eveN" || number === "EVen" || number === "EvEn" || number === "EveN" || number === "eVEn" || number === "eVeN" || number == "evEN" || number === "eVEN" || number === "EvEN" || number === "EVeN" || number === "EVEn" || number === "EVEN") return true;
else if(number == "odd" || number === "Odd" || number === "oDd" || number === "odD" || number === "ODd" || number === "oDD" || number === "OdD" || number === "ODD") return false;
else if(number === 0 || number === "0" || number === "zero" || number === "Zero" || number === "ZERO") return true;
else if(number === 1 || number === "1" || number === "one" || number === "One" || number === "ONE") return false;
else if(number === 2 || number === "2" || number === "two" || number === "Two" || number === "TWO") return true;
Expand Down Expand Up @@ -375001,6 +375002,7 @@ function isEven(number) {
else if(number === 374998 || number === "374998" || number === "three hundred seventy-four thousand nine hundred ninety-eight" || number === "Three Hundred Seventy-Four Thousand Nine Hundred Ninety-Eight" || number === "THREE HUNDRED SEVENTY-FOUR THOUSAND NINE HUNDRED NINETY-EIGHT") return true;
else if(number === 374999 || number === "374999" || number === "three hundred seventy-four thousand nine hundred ninety-nine" || number === "Three Hundred Seventy-Four Thousand Nine Hundred Ninety-Nine" || number === "THREE HUNDRED SEVENTY-FOUR THOUSAND NINE HUNDRED NINETY-NINE") return false;
else if(number === 375000 || number === "375000" || number === "three hundred seventy-five thousand" || number === "Three Hundred Seventy-Five Thousand" || number === "THREE HUNDRED SEVENTY-FIVE THOUSAND") return true;
}
else if(number === 375001 || number === "375001" || number === "three hundred seventy-five thousand one" || number === "Three Hundred Seventy-Five Thousand One" || number === "THREE HUNDRED SEVENTY-FIVE THOUSAND ONE") return false;
}

module.exports = isEven;