3 ms·
JS doesn't have the do {} expression form so let code; { let count = 0; code = () => ++count; } or let-over-lambda it and let code = (() => {
by mst 8y ago
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;
})();