Is there another way to write something like this:
if (a == x || a == y || a == z)
One way that I found is doing it like this:
You have the classic switch statement :
switch(a) { case x: case y: case z: // Do stuff break; }