Is there a shorter way of writing something like this:
if(x==1 || x==2 || x==3) // do something
What I'm looking for is something like this:
if(x.in((1,2,3)) // do something
Is there a shorter way of writing something like this:
if(x==1 || x==2 || x==3) // do something
What I'm looking for is something like this:
if(x.in((1,2,3)) // do something
I'm entirely guessing here, correct the code if I'm wrong: