Simple question, how do I get every option when dividing a number? For example:
24 by 6returns6, 12, 18, 2424 by 4returns4, 8, 12, 16, 20, 2424 by 5returnsfalse
I’ve got a number in my database, for example 2, and my counter, for example 14. That means every time my counter hits the second number, I want to fire my event. So I thought, if I have the solutions 2, 4, 6, etc, and my counter is equal to one of the solutions, I can fire my event.
It’s rather trivial to make.
Some Points
Exceptionas shown in the example.