Comment

Comment by NathanaelRea

You could do an absolutely disgusting IIFE if you need the curly brace spice in your life, instead of a typical JS ternary.

  const y = (() => {
    if (x) {
      return true;
    } else {
      return false;
  })();

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton