Possible Duplicate:
javascript function inArray
In Python, I can do multi-equivalence testing by doing:
if x in [1, 2, 3, 4, 5]:
do something
How would I do this in javascript?. Currently I'm doing:
if (x == 1 || x == 2 || x == 3 || x == 4 || x == 5) {
do something
}