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
). odd(number)
boolean
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
) Last modified 7mo ago