Wendy Gibbons wrote:but in javascript we are now being told to write...
By who?
why has this changed?
Changed from what? Conventions for one language don't always translate to other languages.
or is it still bad
Why is it bad? or good?
but there is some horrible quirk of javascript that makes it a lesser of 2 evils?
It's completely moot. I see no advantage or disadvantage of one style over the other.
I
do avoid putting multiple variables on a single line, though. I find that makes it hard to see what's going on.
And, of course I use proper indentation (missing from your examples) that clearly shows what's going on. To me, it's all about clarity rather than dogma. Do what makes the intent of the code clearest.