169
rated 0 times
[
174]
[
5]
/ answers: 1 / hits: 192394
/ 13 Years ago, thu, february 2, 2012, 12:00:00
Whats the prettiest way to compare one value against multiples options?
I know there are loads of ways of doing this, but I'm looking for the neatest.
i ask because i'd hoped this was workable (it isn't, quite obviously when you look at it):
if (foobar == (foo||bar) ) {
//do something
}
More From » comparison