I have a function that I want to run every time my counter is 1, 3, 5 or 7. I am confused about what the right syntax is for jQuery in this situation.
My try so far:
if (i == (0, 2, 4, 6)) {
This is one of the many versions that I have tried, and failed with.
What is the right syntax, both for every odd number, as well as a specific collection of numbers, for example '3, 12, 512, 2231'?