title: create object from array, using recursion/reduce?
body: <p>I'm just kind of lousy with recursive functions.</p>
  
  <p>I want to turn this...</p>
  
  <pre><code>const input = { regions: ["US", "CA", "LA"], checked: true };
  </code></pre>
  
  <p>...into the following, using recursion and <code>reduce</code>:</p>
  
  <pre><code>const output = {
    US: {
      CA: {
        LA: true
      }
    }
  };
  </code></pre>
  
  <p>Help?  I've tried lots of things, but my experiments are too embarrassing to share.</p>