> On 18 Jun 2015, at 15:59 , Bradley Meck <bradley.m...@gmail.com> wrote: > > (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.
Neat trick. Caveat – you need parentheses around the arrow function: ```js ((a=1)=>{ console.log(a) })(); ``` -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss