Links

odd

To return Yes (true) if the number is odd
With this function, you can check whether a number is odd, i.e. not divisible by 2 without remainder. The return value is either Yes (true) or No (false). 0 is evaluated as even, and therefore returns No (false).

Syntax

odd(number)

Return

boolean

Examples

1
odd(10 + 12)
Result: No (false)
1
odd(10 + 13)
Result: Yes (true)
1
odd(0)
Result: No (false)
1
odd(10.2)
Result: Yes (true)

See also

even which returns Yes (true) if the number is even.
Last modified 11mo ago