Having to compare a value with a bunch of other values is a common, even trivial task for a developer. It’s something you probably don’t even think about when you have to do it. Look at the following JavaScript example: varname='Kurt';if(name==='Jimi'||name==='Amy'||name==='Janis'){// do stuff} Nothing fancy here. It works as you expect it to, but somehow it doesn’t feel quite right. Like you could do it better. Like there must be a smarter way. There are several problems in the above c...