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
Just an addendum.
In the special case where the block contains just a procedure call, you can replace
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.