January 19 meeting notes

Wes Garland wes at page.ca
Fri Jan 20 07:19:25 PST 2012


On 19 January 2012 23:02, Brendan Eich <brendan at mozilla.org> wrote:

> Yes kids, this means we are going with MarkM's lambda desugaring from:
>
> https://mail.mozilla.org/**pipermail/es-discuss/2008-**October/007819.html<https://mail.mozilla.org/pipermail/es-discuss/2008-October/007819.html>
>
> So any closures formed in the body of such a for(let...;...;...) loop will
> capture the binding created afresh for that iteration.


Thank you, Lord!  \o/    Can I get a Hallelujah?   \o/

for (i=0; i < alerts.length; i++) {
  setTimeout(function(i) { return function() { m.add(alerts[i]) } }(i),
(i+1) * 100000);
}

Here ^^ is a real loop I wrote last week, weeping the entire time.

Wes

-- 
Wesley W. Garland
Director, Product Development
PageMail, Inc.
+1 613 542 2787 x 102
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120120/dd0d7078/attachment.html>


More information about the es-discuss mailing list