[Project_owners] Is this valid JS?

Nickolay Ponomarev asqueella at gmail.com
Thu Mar 16 01:10:53 EST 2006

Paul Tomlin wrote:
>> We could argue about it, but that doesn't lead anywhere. However,
>> the question he asked still interests me, and I don't know the answer:
>> Is the construct shown above correct, and officially supported in
>> javascript, or is it not?
> Indeed. I'm tempted to look at the ECMA spec, though it always gives me 
> headaches and never guarantees that it's implemented.

I'll save you some headaches.

 > (function f() { var a = false || return 1 })()
SyntaxError: syntax error


More information about the Project_owners mailing list