On 2008-12-01, at 11:54EST, Mark S. Miller wrote:

On Mon, Dec 1, 2008 at 8:47 AM, P T Withington <[EMAIL PROTECTED]> wrote:


Eh?  So:

function () {
var foo = 42;
{|| var foo = 3; }
return foo;
}

and:

function () {
var foo = 42;
{ var foo = 3; }
return foo;
}

Give the same answer?


No, because you forgot to call it.

Cool. So I can use `{||` and `}` to comment out blocks of code...  :P

function () {
var foo = 42;
{|| var foo = 3; }();
return foo;
}

and:

function () {
var foo = 42;
{ var foo = 3; }
return foo;
}

do give the same answer.

Ok, your suggestion of 'block plus' not 'function minus' is making more sense to me. Still hard for me to understand the newspeak. Trying to wrap my mind around `var` meaning "free"; I think I get it. But, I still think `{||` looks like my cat stepped on the keyboard.
_______________________________________________
Es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to