3 ms·
It doesn't have to be named, your second example still works
by kangoo1707 8y ago
It doesn't have to be named, your second example still works
- wbrasky 8y agonaming anonymous functions can provide some clarity in stack traces however
- SeanLuke 8y agoI got the syntax right? Was completely guessing.
- basil-rash 8y agoYep. 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.