In JavaScript let's say we have the following code
var test = 'd';
if (test != 'a' && test != 'b' && test != 'c')
alert('were good to go');
This if seems rather lengthy to me. I would love to write something like
if (test != ('a' && 'b' && 'c')
alert('were good to go');
Sadly this doesn't work. What is a more elegant way to write this?