title: Does Object.assign() create a deep copy or a shallow copy?
body: <p>I just came across this concept of</p>
  <pre class="lang-js prettyprint-override"><code>var copy = Object.assign({}, originalObject);
  </code></pre>
  <p>which creates a copy of original object into the &quot;<code>copy</code>&quot; object. However, my question is, does this way of cloning object create a deep copy or a shallow copy?</p>
  <p>PS: The confusion is, if it creates a deep copy, then it would be the easiest way to clone an object.</p>