x/30_seconds_of_typescript/docs/isOdd.md
Returns true if the given number is odd, false otherwise.
true
false
Checks whether a number is odd or even using the modulo (%) operator. Returns true if the number is odd, false if the number is even.
%
const isOdd = (num) => num % 2 === 1;
isOdd(3); // true