|
|
|
|
|
by jlhawn
1127 days ago
|
|
In the "Use as a `do` expression" section, the example which uses `run` does not need the `else` cases and could be simplified: function doWork() {
const x = run(() => {
if (foo()) return f();
if (bar()) return g();
return h();
});
return x * 10;
}
|
|