title: How to shallow copy a Set in JavaScript?
body: <p>I haven't used Sets very much, even though I'm familiar with Object/Array references and the need for shallow copies:</p>
  
  <pre><code>const originalObject = { foo: 'bar' };
  const clonedObject1 = Object.assign({}, originalObject);
  const clonedObject2 = { ...originalObject };
  
  const originalArray = ['bar'];
  const clonedArray1 = originalArray.slice();
  const clonedArray2 = [ ...originalArray ];
  </code></pre>
  
  <p>I'm using React and need a <code>new Set()</code> to setState without mutating and re-using the same reference.</p>
  
  <p>How can I perform a shallow copy or slice a <code>new Set()</code>? </p>