(I would have expected one var per line to be an obvious no brainer which didn't need to be stated.)
I don't get why people form such strong opinions about these things when software can automagically convert a list of variables into separate vars or convert one type of string quote into the other. Do what ever the hell you want and then convert your code to the team standard before commit.
So you'd even declare your loop iteration variables at the top of the function?
To be fair to your coworkers, hoisting is a crazy concept and the lack of a block scope is bizarre. Hoisting came from the same mindset that he gave us the dangerous with keyword.
3
u/[deleted] Mar 27 '15 edited Mar 27 '15
I don't get why people form such strong opinions about these things when software can automagically convert a list of variables into separate vars or convert one type of string quote into the other. Do what ever the hell you want and then convert your code to the team standard before commit.
edit
Convert quotes with this option -> http://prettydiff.com/documentation.php#quoteconvert
Convert variable styles with this option -> http://prettydiff.com/documentation.php#varword
Or just use the
airbnbvalue with this option -> http://prettydiff.com/documentation.php#styleguide