HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by kangoo1707 | Hacker News Reader
Parent
Full thread
kangoo1707
·
It doesn't have to be named, your second example still works
View on HN
wbrasky
·
naming anonymous functions can provide some clarity in stack traces however
SeanLuke
·
I got the syntax right? Was completely guessing.
basil-rash
·
Yep. Nowadays you'd be more likely to see it as:
return () => { const next = i; i = i * 2; return next; }
But in this case the two are equivalent.
Reply on news.ycombinator.com