G
Gabriel Gilini
I've just realized, looking at this "JavaScript compressor"[1] output,
that, at least in Firefox 3.0.4, the whitespace(s) between the return
statement and the expression that succeeds it is optional.
Meaning that -
function foo(){
return'bar';
}
foo();
- is a valid JavaScript program.
I looked at the specifications (The return Statement - session 12.9)
and couldn't find anything specific on this subject.
So, is this true for every other modern browser? And if yes, it's kind
of a quirk, isn't it?
[1] http://www.xorax.info/labs/jsxs/
Regards
that, at least in Firefox 3.0.4, the whitespace(s) between the return
statement and the expression that succeeds it is optional.
Meaning that -
function foo(){
return'bar';
}
foo();
- is a valid JavaScript program.
I looked at the specifications (The return Statement - session 12.9)
and couldn't find anything specific on this subject.
So, is this true for every other modern browser? And if yes, it's kind
of a quirk, isn't it?
[1] http://www.xorax.info/labs/jsxs/
Regards