News for hackers. Stuff that matters.
Re:Perl 11 by fouc on Wednesday October 24, 2018 @05:45AM (#18290959)
what's the js equivalent to your example?

   let code = () => {
     let count = 0;
     return ++count 
   }
doesn't do the trick
Re:Perl 11 by mst on Wednesday October 24, 2018 @06:04AM (#18291027)
JS doesn't have the do {} expression form so

  let code;
  {
    let count = 0;
    code = () => ++count;
  }
or let-over-lambda it and

  let code = (() => {
    let count = 0;
    return () => ++count;
  })();