] On Behalf Of liorean
Sent: den 6 februari 2008 01:42
To: es4-discuss@mozilla.org
Subject: Re: Function inside if statement?
Just wanted to point out the thread starting here:
uri:https://mail.mozilla.org/pipermail/es4-discuss/2007-March
/000483.html.
It discusses this issue. Brendan gave
On 2008-02-05, at 18:53 EST, Brendan Eich wrote:
SpiderMonkey has for about a decade implemented three kinds of
function forms: definitions, expressions, and statements. This is an
example of the last -- it's a function definition, syntactically,
except produced as a child of another
if(a) {
function b(){ }
}
A block can contain statements. A statement can't start with the
function keyword.
Mozilla's Core JavaScript guide explains that of |b| should be
evaluated as a functionExpression, but this isn't right.
Source:
On Feb 5, 2008, at 3:45 PM, Garrett Smith wrote:
if(a) {
function b(){ }
}
A block can contain statements. A statement can't start with the
function keyword.
Mozilla's Core JavaScript guide explains that of |b| should be
evaluated as a functionExpression, but this isn't right.
Source:
Just wanted to point out the thread starting here:
uri:https://mail.mozilla.org/pipermail/es4-discuss/2007-March/000483.html.
It discusses this issue. Brendan gave this answer, a few replies in:
Since this is an ES3 extension, allowed by chapter 16, we could
codify the majority-share practice,