This is more out of curiosity but is it possible to concatenate comparisons in javascript?
example:
var foo = 'a',
bar = 'b';
if (foo === ('a' || bar)) {
console.log('yey');
}
as oposed to...
var foo = 'a',
bar = 'b';
if (foo === 'a' || foo === bar)) {
console.log('yey');
}
P.S: When you are comparing the same variable in several conditions, this could be very useful.