const initializers: once more unto the breach

Andy Wingo wingo at igalia.com
Tue Mar 20 14:09:36 PDT 2012


On Tue 20 Mar 2012 21:46, Allen Wirfs-Brock <allen at wirfs-brock.com> writes:

>>      (function (){
>>         baz = 20;
>>         return baz;
>>         const baz = 30;
>>         baz = 40;
>>         baz = 50;
>>       })()
>>       => 20
> no, throws on baz=20; because assignment to an immutable binding

Ah, I see.  Thanks for being patient with my ignorance, and I'll try to
be more diligent next time :)

Cheers,

Andy
-- 
http://wingolog.org/


More information about the es-discuss mailing list