If I've got an enum where all values require assignment, lining up the = makes it easier for my human eyes to scan names and values later.
var firstVar = "one";
var secondVar = "two";
var thirdVar = "three";
I think you'd be hard-pressed to find anyone that would say this is significantly more difficult to read than the lined-up alternative: var firstVar = "one";
var secondVar = "two";
var thirdVar = "three";
But, of course, variable names aren't always going to be short. You might have something like this instead: var firstVar = "one";
var secondVar = "two";
var thirdVar = "three";
var thisVarHasAReallyLongName = "four";
var thisIsAnotherVarWithALongerName = "five";
My eyes don't have any problem scanning the variable names to see what's what. I also find it very natural to scan the variables by-value to determine which value is assigned to which variable (which I believe is typically the argument for the lined-up-equals alternative). Lined up, this looks like the following: var firstVar = "one";
var secondVar = "two";
var thirdVar = "three";
var thisVarHasAReallyLongName = "four";
var thisIsAnotherVarWithALongerName = "five";
I don't know about you, but I find it significantly more difficult to visually parse these by-value to determine the variable corresponding to values "one", "two" and "three". The whitespace gap means that visually I may forget the vertical alignment of what I was looking at on the right when I try to find the variable name on the left.I also think that it's at least a little bit harder to consistently enforce a convention of this kind. If a variable name gets too long, and you're not using some sort of auto-formatting, you have to manually space-out the variables to a new name length every time you introduce a newer, longer-named variable.
I think the real impulse people have for this kind of convention is that it actually just looks a little bit neater, because things are aligned in columns. In reality I think it's much more difficult to parse and maintain.
var firstVar = "one";
var secondVar = "two";
var thirdVar = "three";
var thisVarHasAReallyLongName = "four";
var thisIsAnotherVarWithALongerName = "five"; var firstVar = "one";
var secondVar = "two";
var thirdVar = "three";
var thisVarHasAReallyLongName = "four";
var thisIsAnotherVarWithALongerName = "five";
The different length of the variable names should be derived from the fact that the variables themselves are different. So they should be grouped separately.