Is there a simpler way to rewrite the following condition in JavaScript?
if ((x == 1) || (x == 3) || (x == 4) || (x == 17) || (x == 80)) {...}
Is there a simpler way to rewrite the following condition in JavaScript?
if ((x == 1) || (x == 3) || (x == 4) || (x == 17) || (x == 80)) {...}
You can optimize your own example and get rid of a few characters, making it easier on the eyes..: