Search…
Resources
Related Links
even
To return "true" if the number is even
With this function, you can check whether a number is even, i.e. divisible by 2 without remainder. The return value is either “true” or “false”. The 0 is also evaluated as even.

Syntax

even(number)

Return

boolean

Examples

even(10 + 12)
Result: true
even(10 + 13)
Result: false
even(0)
Result: true
even(10.2)
Result: false

See also

odd, which returns “true” if the number is odd.
Last modified 2mo ago
Export as PDF
Copy link