The implementation predates ES6 let:
https://bugzilla.mozilla.org/show_bug.cgi?id=950547


Rick


On Sat, Jul 26, 2014 at 1:11 PM, Axel Rauschmayer <[email protected]> wrote:

> Does Firefox not yet do the one binding per loop iteration? I would have
> expected the output `0` in the following code.
>
> ```js
> let arr = [];
> for (let i of [0, 1, 2]) {
>     arr.push(() => i);
> }
> console.log(arr[0]()); // 2
> ```
>
>  --
> Dr. Axel Rauschmayer
> [email protected]
> rauschma.de
>
>
>
>
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to