Comment

Comment by bestcoder69

Can also get rid of the `run` and move parens to simplify even further:

  function doWork() {
    const x = () => {
      if (foo()) return f();
      if (bar()) return g();
      return h();
    };
  
    return x() * 10;
  }
parent bestcoder69 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton