Re:JavaScript Getter-Setter Pyramid
by SeanLuke on Wednesday December 19, 2018 @12:38PM
(#18717506)
I got the syntax right? Was completely guessing.
[ Parent
| on HN ]
Re:JavaScript Getter-Setter Pyramid
by basil-rash on Wednesday December 19, 2018 @02:55PM
(#18718913)
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.