title: Cloning an object in JavaScript
body: <p>The below first logs <code>0</code>, and then logs <code>1</code>. How do I store a <em>copy</em> of the object, rather than a <em>reference</em> to it?</p>
  <pre><code>debug.log(vi.details.segment);
  vi.nextSegment = vi.details;
  vi.nextSegment.segment++;
  debug.log(vi.details.segment);
  </code></pre>