3 ms·
That may be a nice addition to the "do expression" proposal for javascript: https://github.com/tc39/proposal-do-expressions https://github.com/tc39/proposal-do-
by mschuetz 7y ago
That may be a nice addition to the "do expression" proposal for javascript: https://github.com/tc39/proposal-do-expressions https://github.com/tc39/proposal-do-expressions
let x = do {
let tmp = f();
tmp * tmp + 1
};
Unfortunately it seems like the proposal doesn't get much attention.
- eyelidlessness 7y agoIt would be nice if every JS statement had an expression equivalent.