||Wed, 17 August 2011 03:09
| Nitin Dahyabhai
Registered: July 2009
On 8/15/2011 11:45 AM, Martin wrote:|
> I was wondering whether there's a way (I can't find one) of getting the
> var myVar = 'test', hisVar = 'real', herVar = 'live';
> var myVar = 'test',
> hisVar = 'real',
> herVar = 'live';
> This would then conform with the standard JSLint practice of declaring
> predilection for grabbing all the variables in the function and then
> simply declaring them first anyway!
> If there's no way of doing it, how would I go about putting it in as a
> feature request?
You can enter a feature request here:
Although that particular combination, one var keyword with multiple
lines, doesn't seem like it would be that popular.
Eclipse WTP Source Editing and JSDT
||Wed, 17 August 2011 14:26
Registered: August 2011
In many languages, a block introduces a scope. Variables introduced in a block are not visible outside of the block.
Hence why people prefer to have a single var, with multiple lines to make it more readable. Plenty of discussion on StackOverflow on a similar theme, if anyone's interested, e.g. use bit.ly/oza1yZ (can't post links yet)
Anyway, I'll go off and make that feature request when I get some time
Powered by FUDForum
. Page generated in 0.02447 seconds