/is-odd

an incredible JavaScript library allowing you to determine if a number is odd or even, based on the WET principle (https://en.wikipedia.org/wiki/Don%27t_repeat_yourself#WET)

Primary LanguageJavaScriptOtherNOASSERTION

is-odd

include is-odd.js in your website:

<script src="is-odd.js" defer>

...then simply call the "isOdd()" function!

console.log(isOdd(2)); // returns false

it's that simple! (¬‿¬)

Note

you might be interested in the new, JIT compiled version, is-odd-jit!