> On Friday, August 31, 2007 9:26 AM, Erik Uzureau wrote:
> To: [EMAIL PROTECTED]
> 
> I prefer:
> 
> function foo() {};
> and
> var foo = function() {};
> 
> whereas s/he prefers:
> 
> function foo() {}
> and
> var foo = function() {}
> 
> do others have an opinion on this? the OC in me wants everything to be
> the same in our code, and I'm more than willing to rollback the
> changes I've just done if people are in favour of the other way of
> doing it.

In the languages I cut my teeth on, this is a function declaration:

 function foo() {}

And this is an assignment statement with an inline function for the rhs:

 var foo = function() {};

And I'm used to semicolon terminators for assignment statements, but 
not for function declarations.

The most important question, though, is what does the language standard 
say?
_______________________________________________
Dev mailing list
[email protected]
http://openlayers.org/mailman/listinfo/dev

Reply via email to