(a=1)=>{
console.log(a)
}()
Is less verbose than an IIFE and keeps `this` the same. Also keeps the
initialization and init of the variable in the same place.
On Thu, Jun 18, 2015 at 8:54 AM, Boris Zbarsky <[email protected]> wrote:
> On 6/18/15 9:01 AM, Kyle Simpson wrote:
>
>> In addition to the fact that this feature is long since co-existing in FF
>> and doesn't seem to have broken the web
>>
>
> Firefox doesn't ship let support on the web by default yet. For example,
> this HTML:
>
> <script>let x = 5;</script>
>
> will result in:
>
> SyntaxError: missing ; before statement
>
> at the location of the 'x'.
>
> You have to explicitly opt in to let support in Firefox right now via
> language="javascript1.8" or similar.
>
> That's not to say this change would break the web; just that we have no
> evidence it doesn't.
>
> -Boris
>
> _______________________________________________
> 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