Check if a number is odd or even

To check if a number is odd or even:

You can also use this inside a foreach loop to identify or set classes on specific odd/even items:

© 2021 - FreshLondon