You could create a function that takes a list of variables and compares them all to another item (you'd use a for loop). You would use it something like this:
var matchesAll = EqualsAll(b, [a, c, d, e, f, g]);
That only cuts down on how much you have to type if you have a lot of variables though.