Hacker News new | ask | show | jobs
by ralusek 2098 days ago
Just have it run this

    function areYouGay() {
      const cached = localStorage.getItem('isGay');
      const isGay = (cached ?? false) ? Number(cached) : Math.random();
      localStorage.setItem('isGay', isGay);
      return (isGay < 0.5) ? 'Yes' : 'No';
    }