I'm curious to know if there's something shorter than
(EDIT: This first part refers to the original phrasing of the question.)
That gives you
(EDIT: The remainder still applies to the new version of the question.)
Now you could apply De Morgan's law. The above is equivalent to
Which is the same length for 3 variables and longer for 2 variables. But for each variable beyond the third, you save one more character!
Lastly, if you know that your variables are numbers, you can also use the bitwise operator, i.e.
If you actually need booleans (which I assume from your snippet), this doesn't work for the
Bonus tip: if you ever want to turn a truthy/falsy value (like a non-zero/zero number) into a boolean, don't use
This function is obviously not the shortest until you have a lot of numbers to check (the poster did say "or more"). It verifies that all arguments are equal to zero.
If you push a different number in the args.push(x) line, it will check that all of the arguments are equal to that number.
In pure code golf terms multiplication is shorter:
Which works since (in most browsers) 0 is false and anything else will work as true.
But I expect from a performance perspective the other answer is superior.