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: